Hi Thomas,
with the subtypes in z88dk, there are two that are designed to run on "bare metal" as a ROM, and others that rely on a base of some type.
The "acia" and the "sio" subtype run from bare metal, and configure interrupt vectors and provide serial ports, by writing Page 0 of the ROM, etc.
The "basic", "cpm", and "hbios" subtypes run from their underlying platforms, and these subtypes have no inherent knowledge of the vectors, as they don't configure the Page 0 ROM.
You can read this setting from the
TAR__crt_org_vector_table being 0 and
TAR__crt_org_code being non zero.
The "basic" subtype relies on the simple serial interface of RST8, RST10, and RST18 calls for interface to the serial device, and what happens after that it doesn't care about.
The #pragma output setting won't help here, because we don't have access to write to the Page 0 ROM in SCM or in BASIC.
Here you take the address of your function, and write it into the vector address which is offset from the
VECTOR_BASE which is
set here as 0x8000.
Just write the required vector or address of your function into the table, and you're good to go.
The Grant Searle NASCOM BASIC doesn't do this and the RST vectors are hard coded to ROM, so don't even bother.
So you can write a little assembly function that you can call from C to fill the address using the API.
I'm sure that the vector table will be somewhere sensible, and you could write to it directly, but I can't see the location from a quick scan of the manual. Sorry.
It might be the $FE16 word that you found. And if it is then you can use the same method as above, by writing directly to it.
I can do a little C for you if that is helpful?
Cheers, Phillip