?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download

  1. ;  The syntax `<label>+<single_digit>[:]` is meant to be used as self-modify-code marker only,
  2. ; so the plus and single digit should cover cases (+1..+3).
  3. ;  The syntax is intentionally limited to not clash with regular
  4. ; syntax (expressions "eating" `and/or/xor` instruction, etc.)
  5.  
  6. x       equ     1
  7.     org #8000
  8. lA:     and 1
  9.     ; valid extra syntax (colon is optional)
  10. lB+1    and 2
  11. lC+1:   and 3
  12. lD+0    and 4   ; pointless, but valid
  13. lE+9    and 5
  14.     ; valid extra syntax, empty remainder of line
  15. lO+2
  16. lP+3:
  17.     ; syntax errors (single digit only)
  18. lF+10   and 6
  19. lG+#1   and 7
  20.     ; syntax errors (no expressions, no evaluation)
  21. lH+(1)  and 8
  22. lI+x    and 9
  23. lJ+1+2  and 10
  24. lK+1-3  and 11
  25.     ; syntax errors (no minus either)
  26. lL-1    and 12
  27. lM-1:   and 13
  28.  
  29. 123+1   jr  123B
  30. 124+1:  jr  124B
  31.  
  32. lN+1    MACRO
  33.             nop
  34.         ENDM
  35.         lN
  36.  
  37.         STRUCT S_TEST
  38. Byte        BYTE    0x12
  39. Smc+1       BYTE    0x34    ; error, can't have SMC
  40.         ENDS
  41.  
  42. NormalStruct    S_TEST
  43. SmcStruct+1     S_TEST      ; error, can't have SMC
  44.  
  45.     ASSERT #8000+0 == lA
  46.     ASSERT #8002+1 == lB
  47.     ASSERT #8004+1 == lC
  48.     ASSERT #8006+0 == lD
  49.     ASSERT #8008+9 == lE
  50.     ASSERT #800A   == lF
  51.     ASSERT #800A+2 == lO
  52.     ASSERT #800A+3 == lP
  53.