techElder
Well-known member
Even though I set out to solve some problems with PUSH/POP, I've not been able to find a perfect all-in-one solution.
What I haven't solved is the bptr problem.
bptr isn't a WORD, and it isn't always a BYTE. Since it can address 512 RAM locations it must have at least 9 bits.
On the processors involved, if you want to POKE bptr, you can't save it as a WORD. It does pass syntax checking for POKE address, WORD bptr, but it will only save 8 bits (255 instead of 511.)
I don't know why the compiler was designed to make the exception (for processors are involved) for bptr in the syntax check and not handle the important detail of saving the 9 bits.
If you POKE it as a byte, then you can only save the lowest 8 bits, too. That is fine if you are only addressing 256 RAM locations, but not fine for 512 RAM locations (14M2, 18M2 and 20M2.)
When the 14M2, 18M2 and 20M2 processors are involved, I've been saving bptr into an interim WORD variable to get all 9 bits saved. Not ideal.
What I haven't solved is the bptr problem.
bptr isn't a WORD, and it isn't always a BYTE. Since it can address 512 RAM locations it must have at least 9 bits.
On the processors involved, if you want to POKE bptr, you can't save it as a WORD. It does pass syntax checking for POKE address, WORD bptr, but it will only save 8 bits (255 instead of 511.)
I don't know why the compiler was designed to make the exception (for processors are involved) for bptr in the syntax check and not handle the important detail of saving the 9 bits.
If you POKE it as a byte, then you can only save the lowest 8 bits, too. That is fine if you are only addressing 256 RAM locations, but not fine for 512 RAM locations (14M2, 18M2 and 20M2.)
When the 14M2, 18M2 and 20M2 processors are involved, I've been saving bptr into an interim WORD variable to get all 9 bits saved. Not ideal.