Blame | Last modification | View Log | Download
# file opened: relocation_disp_outside.asm1 0000 ; init ZX48 device, put machine code at $80002 0000 DEVICE ZXSPECTRUM482 0000 ORG $80003 8000 ; but make relocation block base address $0000 with DISP4 8000 DISP $00005 00006 0000 RELOCATE_START7 00008 0000 01 00 dw relocate_count9 0002 02 00 dw relocate_size10 000411 0004 label1:12 0004 CD 04 00 call label1 ; relocate13 0007 CD 0D 00 call absolute1 ; no relocation14 000A label2:15 000A 21 06 00 ld hl,label2-label1 ; no relocation16 000Drelocation_disp_outside.asm(17): error: The DISP block did start outside of relocation block, can't end inside it17 000D ENT ; error, can't finish DISP which did start outside18 000D19 000D RELOCATE_END20 000D21 000D absolute1:22 000D ENT23 800D24 800D 05 00 RELOCATE_TABLE25 800F ; 05 0026 800F27 800F ; verify the actual machine code was placed at $8000 in virtual device memory28 800F SAVEBIN "relocation_disp_outside.bin", $8000, $ - $800029 800F# file closed: relocation_disp_outside.asmValue Label------ - -----------------------------------------------------------0x000D absolute10x0004 label10x000A label20x0001 relocate_count0x0002 relocate_size