?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download

  1.     ; init ZX48 device, put machine code at $8000
  2.     DEVICE ZXSPECTRUM48 : ORG $8000
  3.     ; but make relocation block base address $0000 with DISP
  4.     DISP $0000
  5.  
  6.     RELOCATE_START
  7.  
  8.     dw      relocate_count
  9.     dw      relocate_size
  10.  
  11. label1:
  12.     call    label1              ; relocate
  13.     call    absolute1           ; no relocation
  14. label2:
  15.     ld      hl,label2-label1    ; no relocation
  16.  
  17.     ENT                         ; error, can't finish DISP which did start outside
  18.  
  19.     RELOCATE_END
  20.  
  21. absolute1:
  22.     ENT
  23.  
  24.     RELOCATE_TABLE
  25.     ; 05 00
  26.  
  27.     ; verify the actual machine code was placed at $8000 in virtual device memory
  28.     SAVEBIN "relocation_disp_outside.bin", $8000, $ - $8000
  29.