Well... for anyone interested, here's what I found.
Once the actual program code passes the $1000 (dec 4,096) boundary, the POKECODE instruction starts inserting a BCF, BSF, and a CALL every time it is used (I'm guessing it's trying to do bank switching?).
This makes POKECODE worthless for use past the $1000 boundary, as your data is stored shifted up three places from where you expect it to be.
After searching about the forum, I found a post from Melanie about saving data to code-space, and so used this instead:
ASM
CODE 0x1F40 ; Data start location @ dec. 8,000
DB 0x57,0x58,0x59 etc... ; Store data bytes starting at location 8,000
DB 0x22,0x19,0x1B etc...
etc...
etc...
EndASM
The "CODE" and "DB" statements should be indented - and "0x" should be used instead of "$" to indicate hexadecimal.
The "DB" instruction adds the RETLW ($34) instruction to the first six bits of each 14-bit Program Word.




Bookmarks