?login_element?

Subversion Repositories NedoOS

Rev

Rev 126 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1.     MACRO MYMACRO1 addr, string, term
  2.         ld de,addr
  3.     ENDM
  4.  
  5.     MACRO MYMACRO2 addr, string
  6.         ld de,addr
  7.     ENDM
  8.  
  9.     MACRO MYMACRO3 _addr, _string, _term
  10.         ld de,_addr
  11.     ENDM
  12.  
  13.     MACRO MYMACRO4 addr?, string?, term?
  14.         ld de,addr?
  15.     ENDM
  16.  
  17.     ORG 0x1234
  18.     ; this will fail with "Label not found: test_result_1", because "string" sub-part is substitued with "1"
  19.     MYMACRO1 test_result_string, 1, 0   ; this is feature, not bug (see "macro_test.asm")
  20.  
  21.     ; this will fail with "Label not found: test_result_1", because "string" sub-part is substitued with "1"
  22.     MYMACRO2 test_result_string, 1
  23.  
  24.     ; this will not fail, since v1.11.2 the sjasmplus substitution rules were modified.
  25.     ; The macro arguments and define's names starting with underscore will prevent the in-middle substition
  26.     ; so the `_string` macro argument can substitute only whole `_string` term, but not at the end of `test_result_string`
  27.     MYMACRO3 test_result_string, 1, 0
  28.  
  29.     ; this should work, and was suggested as fix to the Issue#35 reporter
  30.     MYMACRO4 test_result_string, 1, 0
  31.  
  32. test_result_string: defb 0
  33.