Rev 129 | Blame | Compare with Previous | Last modification | View Log | Download
# file opened: issue35.asm1 0000 MACRO MYMACRO1 addr, string, term2 0000 ~ ld de,addr3 0000 ENDM4 00005 0000 MACRO MYMACRO2 addr, string6 0000 ~ ld de,addr7 0000 ENDM8 00009 0000 MACRO MYMACRO3 _addr, _string, _term10 0000 ~ ld de,_addr11 0000 ENDM12 000013 0000 MACRO MYMACRO4 addr?, string?, term?14 0000 ~ ld de,addr?15 0000 ENDM16 000017 0000 ORG 0x123418 1234 ; this will fail with "Label not found: test_result_1", because "string" sub-part is substitued with "1"19 1234 MYMACRO1 test_result_string, 1, 0 ; this is feature, not bug (see "macro_test.asm")issue35.asm(2): error: Label not found: test_result_1issue35.asm(19): ^ emitted from here19 1234 11 00 00 > ld de,test_result_120 123721 1237 ; this will fail with "Label not found: test_result_1", because "string" sub-part is substitued with "1"22 1237 MYMACRO2 test_result_string, 1issue35.asm(6): error: Label not found: test_result_1issue35.asm(22): ^ emitted from here22 1237 11 00 00 > ld de,test_result_123 123A24 123A ; this will not fail, since v1.11.2 the sjasmplus substitution rules were modified.25 123A ; The macro arguments and define's names starting with underscore will prevent the in-middle substition26 123A ; so the `_string` macro argument can substitute only whole `_string` term, but not at the end of `test_result_string`27 123A MYMACRO3 test_result_string, 1, 027 123A 11 40 12 > ld de,test_result_string28 123D29 123D ; this should work, and was suggested as fix to the Issue#35 reporter30 123D MYMACRO4 test_result_string, 1, 030 123D 11 40 12 > ld de,test_result_string31 124032 1240 00 test_result_string: defb 033 1241# file closed: issue35.asmValue Label------ - -----------------------------------------------------------0x1240 test_result_string