Add #macro and #define support #10

Closed
deNULL opened this Issue Apr 8, 2012 · 2 comments

1 participant

@deNULL
Owner

After the moment there will be some standard way for defining macros and constants, it should be implemented in the assembler.

Currently I've seen two possible syntaxes for macro:

#macro name(param1, param2, param3) {
 ... ; some code
}

(from http://pastebin.com/raw.php?i=aJSkRMyC, presumably Notch's code)

and

#macro name(param1, param2, param3)
  ... ; some code
#endmacro

(from reddit: http://www.reddit.com/r/dcpu16/comments/ry58l/macro_support_in_assemblers/)

@deNULL deNULL was assigned Apr 8, 2012
@deNULL
Owner

#macro implemented (Notch's syntax)

@deNULL
Owner

#define implemented as well; syntax:

#define PI 3             ; instead of 3 there can be any literal expression
@deNULL deNULL closed this Apr 27, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment