On the Tube, it (according to the manual) returns the load address of the currently running program; which is normally 0x8000 for Basic or &B800 for HiBasic.
The problem is... *RUN programs count as programs for the purposes of OSBYTE 0x84. So this happens:
Code: Select all
COW/OUT 00000800 00000800 000004F7
LOMEM is: 0x0D26
HIMEM is: 0x0800
I could just detect that I'm on the Tube and use a hardcoded value of 0xF800 instead of calling OSBYTE 0x84, but that seems antisocial. Is there a better way to do this?
(Incidentally, VDFS always loads into the I/O memory, regardless of how the high bits of the address are set. This can cause Hilarious Results when the program runs if it happens to stomp over the sound and envelope workspace. Ask me how I know!)