?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1.             ORG     0x1000
  2.  
  3. nop:        nop
  4.             ld      hl,nop
  5.             ld      hl,@nop
  6.             ld      hl,?nop
  7.             ld      hl,+nop
  8.  
  9. not:        cpl
  10.             ld      hl,not      ; error, collides with "not" operator
  11.             ld      hl,@not
  12.             ld      hl,?not
  13.             ld      hl,+not     ; error, collides with "not" operator
  14.  
  15. ; all of the following should be valid
  16. symbol_22
  17. symbol_23   DEFL    23
  18. symbol_24   =       24
  19. symbol_25   EQU     25
  20.  
  21. ; make pass2 differ from pass1, reporting broken flow of local numeric labels
  22.             IFUSED symbol_22
  23. 404         nop
  24. symbol_22                       ; also duplicate label in pass2 error
  25.                                 ; ^^^ seems to be bugged currently, only warnings happens
  26.             ENDIF
  27.             jr      symbol_22
  28.  
  29. ; local numeric labels are more limited
  30. 22
  31. 23          DEFL    23
  32. 24          =       24
  33. 25          EQU     25
  34.             jr      22B
  35.  
  36. errSymbol1  DEFL    !
  37. errSymbol2  =       !
  38. errSymbol3  EQU     !
  39.  
  40.     STRUCT TEST_STRUCT
  41. X       BYTE    1
  42. Y       WORD    0x0302
  43.         ALIGN
  44.         ALIGN
  45.     ENDS
  46.  
  47.     STRUCT TEST_STRUCT_2
  48. .X:     BYTE    8
  49. 3       BYTE    -8
  50.         BLOCK   !
  51.         BLOCK   1,!
  52.         BYTE    0xFF
  53.         D24     !
  54.         BYTE    0xFF
  55.         DWORD   !
  56.     ENDS
  57.  
  58.     MODULE Module1
  59.  
  60.         STRUCT TEST_STRUCT
  61. Z           BYTE    0xFF
  62.             ALIGN
  63.             ALIGN
  64.         ENDS
  65.  
  66. instanceModule  TEST_STRUCT
  67.  
  68. instanceGlobal  @TEST_STRUCT
  69.  
  70.             TEST_STRUCT
  71.  
  72.             @TEST_STRUCT
  73.  
  74.         STRUCT TEST_STRUCT_2
  75. .Z:         BYTE    4
  76. 5           BYTE    -4
  77.             BLOCK   !
  78.             BLOCK   1,!
  79.             BYTE    0xFF
  80.             D24     !
  81.             BYTE    0xFF
  82.             DWORD   !
  83.         ENDS
  84. instanceMod2    TEST_STRUCT_2
  85. instanceglob2   @TEST_STRUCT_2
  86.                 TEST_STRUCT_2
  87.                 @TEST_STRUCT_2
  88.  
  89.         STRUCT TEST_STRUCT_3
  90. .S2Mod:     TEST_STRUCT_2
  91.  
  92.     ; empty line above is intentional to exercise certain code path in parser.cpp
  93. .Empty      ; skipBlank(..) exercise
  94. .S2Glob:    @TEST_STRUCT_2
  95. .Self:      TEST_STRUCT_3
  96.         ENDS
  97.  
  98.     ENDMODULE
  99.