myMacro #11 myMacro 11 myMacro .macro value lda \value .endm

!macro myMacro .immediate, .param { !if .immediate { lda #.param } else { lda .param } } +myMacro 0, 100 ; lda 100 +myMacro 1, 100 ; lda #100

assertGreaterOrEqual(CmdArgument(AT_IMMEDIATE, 50), CmdArgument(AT_ABSOLUTE, result), "i say that 50 isn't >= than actual")

assertGreaterOrEqual #50, result, "i say that 50 isn't >= than actual"

assertAbsoluteEqualToX(stackPointer, "stack pointer not equal") stackPointer: .byte 0

+assertEqual 10, result +assertAbsoluteEqual addressMemory, result

I overcame the same issue with Kick Assembler, where I used CmdArgument() to pass AT_IMMEDIATE, or AT_ABSOLUTE which seems to be a nice feature, but then I have something like this in Kick Assembler: assertGreaterOrEqual(CmdArgument(AT_IMMEDIATE, 50), CmdArgument(AT_ABSOLUTE, result), "i say that 50 isn't >= than actual")

.function ARGIMM(value) { .return CmdArgument(AT_IMMEDIATE, value) } .function ARGABS(value) { .return CmdArgument(AT_ABSOLUTE, value) }

assertGreaterOrEqual(ARGIMM(50), ARGABS(result))

@soci Well... not that bad, but Kick Assembler version doesn't seem to be user friendly :).

How about packing the CmdArgument-Expression into functions to make it more readable: .function ARGIMM(value) { .return CmdArgument(AT_IMMEDIATE, value) } .function ARGABS(value) { .return CmdArgument(AT_ABSOLUTE, value) } That reduces your call to assertGreaterOrEqual(ARGIMM(50), ARGABS(result))

assertGreaterOrEqual(11, myRegister, "") // pass immediate value of #11

assertGreaterOrEqual(calculatedSomewhere, myRegister, "") // pass value under calculatedSomewhere register