Created
September 16, 2016 15:55
-
-
Save ksherlock/abb8459d0cc4c689a9f0354006cbda94 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Harpoon assembler now supports macros. | |
macro name [arguments...] { | |
... | |
} | |
arguments are in the form `&identifier`. The final argument may include an ellipsis to capture variadic arguments. | |
(`&identifier...`). Within the macro, `&...` expands to the full argument set. Arguments are replaced as-is, | |
macro load &p { lda #10 * &p} | |
load 1 + 2 ; lda #10 * 1 + 2 not lda #10 * (1+2) | |
@labels will be scoped within the macro. (not yet implemented, though :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment