?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download

  1.     ORG     $1000
  2.     ; regular temporary label syntax
  3. 1
  4.     jp  1B
  5.     jp  1F
  6. 1
  7.     ; new underscore suffix syntax
  8.     jp  1_B
  9.     jp  1_F
  10. 1
  11.     ; old syntax in regular instructions is ignored ("1B" becomes binary value)
  12.     ld  hl,1B
  13.     ; new underscore suffix syntax enables temporary labels also in regular instructions
  14.     ld  hl,1_B
  15.     ld  hl,1_F
  16. 1
  17.     ; check new underscore suffix in expressions
  18.     ld  hl,((1_F+(1_B<<1))-1_F)>>1
  19. 1
  20.     ; check usage across macro instances
  21.     MACRO node num?, ofs?
  22.         ld hl,1_B+ofs?
  23.         ld (hl),num?
  24.         ld hl,1_F+ofs?
  25. 1
  26.     ENDM
  27.  
  28.     node 'A',1
  29.     node 'B',2
  30.  
  31.     ld  hl,1_B!AD    ; this should fail
  32.