Okay, I am developing a ROM that reserves some memory while booting. Standard stuff acting on H.STKE or H.CLEA. I initially stored the 16-bit pointer to this memory in the corresponding SLTWRK area. This depends on the slot, subslot and page the ROM is in.
And now comes the issue. I have also hooked H.TIMI which fires every interrupt. The idea is to check data that a worker process has put in this memory address and then do something with it. For this to work I have to do the SLTWRK math at every interrupt which is just a waste of CPU cycles. To get an idea what needs to be done every interrupt check here.
The question is, are there more standard compliant ways to do this? I can of course hardcode the expected SLTWRK address. I can store the pointer to my work area somewhere else with the risk it to be overwritten. Or do something non-standard and use a fixed non-used area above F380.
Any ideas? Let me know.