Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Including / compiling code to different addresses
#1
Hi there,

I'm in need of some advice with loading code to specific addresses.


1. A way to include a ZXBC basic file - during compilation - at a specific address. Something like this...
#INCLUDE "font.bas" ' load font relevant code to 24576
#INCLUDE "setup.bas" ' load program setup code to 24576 + compiled size of font.bas
#INCLUDE "graphicscode.bas", 38000 ' load graphics code and variables direct to address 38000.

This would see non-speed critical #INCLUDE code (and variables) first compiled to the program's ORG address (24576) and code (and variables) that must run in uncontended memory space - placed at the specified address.


2. How to directly include a binary blob to a specific address, without the use of labels and memmove, memcopy, zx7 unpack, etc. Something like this...
ASM
INCBIN "graphics.bin", 45000
END ASM

Thanks
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)