Hi all,
Hope someone can help out with this odd problem.
Have a bit of code for the 16F877. The code itself is about 3,100 words, and there are about 1,000 bytes of data stored at the end using POKECODE:
@ org 7100 ; Set data start location
POKECODE data here...
POKECODE more data here...
and so on for all the data.
This all works out fine, with the program compiling fine, and data being read properly by the program.
Now to the problem...
I added about 1,000 words to the program - bringing it up to about 4,100 words total, with the same exact, unchanged data stored at the end using the POKECODEs.
BUT... now each POKECODE instruction is adding in 3 extra words each time it is used! This completely mixes up the data, because there are now 3 extra unwanted locations taken up for each POKECODE used - and several POKECODE instructions are needed to fill the 1,000 bytes of data.
As I understand it POKECODE just places a RETLW followed by the data byte into the specified code location - so where are these 3 extra words coming from? - and how do I get rid of them?
Any ideas greatly appreciated
Thanks,
Arch
< EDIT >
Here' the programmers buffer from a test:
1F40: 158A 120A 277B 3452 3452 3452 3452 3452
It looks like the opcodes for BSF, BCF, and a CALL are getting added in before the 5 ASCII values for "R" that I wrote as a test using POKECODE.
Bookmarks