08M eeprom allocation problem

sghioto

Senior Member
Here's the code for a simple test circuit to demonstrate the problem. Syntax says "49 out of 256 bytes used", OK. I want to store numbers in the remaining eeprom locations starting with #49, OK. If I write line #9 to say ( if b0 = 255 then send ) the circuit will not operate correctly. It only works if the value of (b0) does not exceed 207, which also happens to equal 256 minus 49. This leaves only 158 eeprom locations available. Why can't I use all 207 remaining locations in this application and what happened to locations 208 through 255 .

Thanks,
Steve G.
 

Attachments

gbrusseau

Senior Member
This thread should explain it.

Hippy said this:
There are 144 bytes of data used, 108 bytes of code used and 4 bytes left spare.

The problem / confusion seems to be that the Programming Editor reports 218 bytes used rather than 252 bytes used which is the real score, a discrepancy of 34 bytes.

I recall there's been some discussion on this before and, if I remember right, it comes down to data bytes which are zero not be counted as used even when they are. Looking at the program there seems to be about 32 bytes of data which are zero ( plus two bytes of hidden code which will be zero at the end of code ), so that would make everything add up.

Put it down to the Programming Editor not being able to count and giving inaccurate information.

http://www.picaxeforum.co.uk/showthread.php?t=9806
 
Last edited:

sghioto

Senior Member
I see now that the code is in a descending order. Making (b0) = 0 allows all 209 remaining locations to accept data. Thanks, "gbrusseau" for the quick response.

Steve G.
 
Top