?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download

  1.     IFDEF recursively_included
  2.     ; this part is included from this same file at the end of regular part
  3.         DEVICE ZXSPECTRUMNEXT
  4.                     ORG $F000           ; these should be page 63 set by non-included code
  5. IncludedLabel:          rst $00
  6. .localLabel1:           rst $08
  7. Including2ndFile:   INCLUDE "sld_basics.i.asm"      ; and try here also regular non-recursive include
  8.     ; following part is the "regular" one, which will include the part above
  9.     ELSE
  10.  
  11.     DEVICE ZXSPECTRUMNEXT
  12.     CSPECTMAP "sld_basics.sym"
  13.         MODULE next
  14.                     ORG $DFFF, 63       ; page 63 into E000..FFFF region (slot 7 active)
  15. .localLabel1:           nop             ; but these are still in page 0 in C000..DFFF
  16. .localLabel2:           daa             ; these should be in page 63
  17. .localEqu1          EQU $CCCC
  18.  
  19. testMacro       MACRO
  20.                     ; macro definition should not affect anything here
  21. .localFromMacro:
  22.                 ENDM
  23.  
  24. .localEqu2          EQU $EEEE
  25. .localVar           = $1111             ; DEFL/= symbol-variables are excluded from SLD
  26.                         testMacro       ; shouldn't emit machine code either
  27. .localLabel3            ret             ; this one should
  28. .someDbBytes            DZ      "Hello 1337!"
  29.         ENDMODULE
  30.  
  31.     DEVICE NONE
  32.         MODULE no_device
  33.                     ORG $E100
  34. DeviceNoneLabel:        scf             ; both should produce page -1
  35. .localEqu2          EQU $EEEF
  36. .localVar           = $1112             ; DEFL/= symbol-variables are excluded from SLD
  37.                         testMacro       ; shouldn't emit machine code either
  38. .someDbBytes            DZ      "Hello 1337!"
  39.         ENDMODULE
  40.  
  41.     DEVICE ZXSPECTRUM48                 ; just to test device data
  42.  
  43.     DEVICE ZXSPECTRUM128
  44.         MODULE zx128
  45.                     ORG $BFFF,4         ; page 4 into C000..FFFF region (slot 3 active)
  46. DeviceZx128Label1:      cpl             ; for 8000..BFFF the default page is 2
  47. DeviceZx128Label2:      rrca            ; for C000..FFFF the page is 4
  48. Zx128Equ            EQU $CCCC
  49. .localEqu2          EQU $EEF0
  50. .localVar           = $1113             ; DEFL/= symbol-variables are excluded from SLD
  51.                         testMacro       ; shouldn't emit machine code either
  52. .someDbBytes            DZ      "Hello 1337!"
  53.         ENDMODULE
  54.  
  55.         DEFINE  recursively_included
  56.         INCLUDE "sld_basics.asm"
  57.     ENDIF
  58.