Files
open-simh.simtools/crossassemblers/macro11/tests/test-bsl-mac-arg.mac
Olaf Seibert 404a7e726d Add 'crossassemblers/macro11/' from commit '2a14ffe2519589011ffc4050d5d4fd6591fb4c3c'
git-subtree-dir: crossassemblers/macro11
git-subtree-mainline: fc2c8875ca
git-subtree-split: 2a14ffe251

command was: git subtree add --prefix=crossassemblers/macro11 git://github.com/Rhialto/macro11.git master
2016-02-21 11:00:41 +01:00

25 lines
862 B
Plaintext

.list me
.macro test x
.blkb x ; test some directive that wants an expression
.endm
size = 10
foo = 2
; likes:
test size ; not replaced by "10"
test \size ; replaced by "10"
test \<size> ; ditto
test \<size + foo> ; replaced by "12"
test ^/size + foo/ ; arg is "size + foo", not "12"
; dislikes:
test <\size> ; parameter is \size, which might be ok for
; macros where the argument is used differently.
test size + foo ; gets split at the space
test /size + foo/ ; gets split at the space
test \/size + foo/ ; invalid expression with division operator
test \^/size + foo/ ; original dislikes this, but we accept it.