<not certain where to land this>
I am working on a driver that will stay resident after loading. This driver is being written in 'C' using the
zcc commands and tools.
In CP/M 2.2 and 3.0 there is the concept of loading an extension to CP/M and expecting it to stay in memory.
This is done by adjusting the base address of CP/M via altering the low address pointer etc....
Now for the problem. I need to build and link my driver with a load address of say 8000 hex, and have all
the linking work out for that address. Then a loader will be used to place the binary and call an initialization
routine. After that the code should remain in memory and preform its driver functions until CP/M is restarted,
via reboot.
I don't see how this is done with z88dk. I presume the crt0 will need to be tweeked, but how do I tell the compiler/linker
what my address should be ?
tnx
jc
Target loading address for cp/m programs
usually we leave support for the '-zorg=' parameter, we missed it on the CP/M, because it looked quite a fixed location.
I know the original CP/M had options for having the TPA at different locations, but it was rarely used and the applications couldn't run easily on a machine like that, so it's VERY unusual.
It's easy to add support for 'zorg', or you can edit the start-up code yourself:
https://github.com/z88dk/z88dk/blob/mas ... c_crt0.asm
What you already have is probably even better If you build the program with adding the '-startup=2' parameter, it will link your program at $8000 and will provide a relocation routine, so you can load it as a normal COM program.
This feature was useful with those computers doing odd memory paging to support high resolution bitmapped graphics and looks like a good option for you as well.
Stefano
I know the original CP/M had options for having the TPA at different locations, but it was rarely used and the applications couldn't run easily on a machine like that, so it's VERY unusual.
It's easy to add support for 'zorg', or you can edit the start-up code yourself:
https://github.com/z88dk/z88dk/blob/mas ... c_crt0.asm
What you already have is probably even better If you build the program with adding the '-startup=2' parameter, it will link your program at $8000 and will provide a relocation routine, so you can load it as a normal COM program.
This feature was useful with those computers doing odd memory paging to support high resolution bitmapped graphics and looks like a good option for you as well.
Stefano