?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download

  1.     DEVICE AMSTRADCPC464
  2.  
  3.     ORG $0
  4. basic_code:
  5. ;   10  CLS
  6. .l10    DW .l10sz, 10 : DB $8A, $00
  7. .l10sz  EQU $-.l10
  8. ;   20 PRINT "I like rusty spoons"
  9. .l20    DW .l20sz, 20 : DB $BF, "\"I like rusty spoons\"", $00
  10. .l20sz  EQU $-.l20
  11.     .db $00
  12. .sz equ $-basic_code+1
  13.  
  14.     ORG $7FFF
  15.     DB '1'              ; mark page 1 at end
  16.     DB '2'              ; mark page 2 at beginning
  17.  
  18.     ORG 0x10000-4
  19. endStart:
  20.     DB '!end'           ; mark end of RAM at $FFFF (to check saving of last byte)
  21. .sz EQU $-endStart
  22.     ASSERT $10000 == endStart + endStart.sz
  23.  
  24.     MMU $4000, 0        ; map page 0 to slot 1
  25.     MMU $8000, 3, $7FFF ; map page 3 to slot 2
  26. dataStart:
  27.     DB '0'              ; mark page 0 at end
  28.     DB '3'              ; mark page 3 at beginning
  29. .sz EQU $-dataStart
  30.  
  31.     ; create empty CDT file
  32.     SAVECDT EMPTY "savecdt_basic.cdt"
  33.  
  34.     ; save valid CPC BASIC example
  35.     SAVECDT BASIC "savecdt_basic.cdt", "A", basic_code, basic_code.sz
  36.  
  37.     ; first block: pages 0+3
  38.     SAVECDT BASIC "savecdt_basic.cdt","basic1",dataStart,dataStart.sz
  39.  
  40.     ; second block: pages 1+2
  41.     MMU $4000 $8000, 1  ; map pages 1,2 to slots 1,2
  42.     SAVECDT BASIC "savecdt_basic.cdt","basic2",dataStart,dataStart.sz
  43.  
  44.     ; third block, saving last bytes of address space
  45.     SAVECDT BASIC "savecdt_basic.cdt","basic3",endStart,endStart.sz
  46.