Skip to content

Instantly share code, notes, and snippets.

@MrSmith33
Created April 18, 2014 21:02
Show Gist options
  • Save MrSmith33/11064293 to your computer and use it in GitHub Desktop.
Save MrSmith33/11064293 to your computer and use it in GitHub Desktop.
dasm < stmt* eoi
lines <- (stmt )*
stmt <- basicOpcode / specOpcode / preStmt
preStmt <-
basicOpcode <- opcode expr, expr
specOpcode <- opcode expr
expr <- Arithmetic / Id
Id <-
.include "file"
.include <file>
.incbin "file"
.incbin <file>
.def name [expr]
.define name [expr]
.equ name expr
.undef name
.dw expr [,expr...]
.dp expr [,expr...]
.fill count[,expr]
.ascii [flags kszxap][<expr>]"string"
.macro name([param [,param...]])
code
.end
name([param [,param...]])
.rep times
code
.end
.if expr
codeTrue
.elif expr
codeElseTrue
.elseif expr
codeElseTrue
.else
codeElse
.end
.ifdef definition
.ifndef definition
isdef(definition)
.align boundary
.org address
.echo message
.error message
:label1 [A-Za-z](([A-Za-z0-9._])*[A-Za-z0-9_])?
_locallabel1: _(([A-Za-z0-9._])*[A-Za-z0-9_])?;colon at the end is preffered
operators
+ - * / % ! ()
& ^ | ~ << >>
== != <> < . <= >= & ^ | && || ^^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment