5.0.7 Compiler Bug

hippy

Ex-Staff (retired)
Version 5.0.7
Enhanced Compilers
18X, 16 or 256 GOSUB's
28X, 16 or 256 GOSUB's

Compiles the following file okay, around 1300 bytes used of 2048.

Insert the "SETINT 0,0" at line 636 after the label "Finished:" and the compiler throws a wobbler giving the error "Memory location already used".

http://homepage.ntlworld.com/the.happy.hippy/picaxe/tasking5.txt
 

hippy

Ex-Staff (retired)
Same error with the Standard compilers after removing enhanced compiler syntax.
 

Technical

Technical Support
Staff member
The compiler only allows 'setint' command to be used 11 times in a program at the moment. We will look at increasing the value in the next release, but you are using it in an unusual way....

Incidentally IPM is 29 and important ;-)
 

hippy

Ex-Staff (retired)
<i>The compiler only allows 'setint' command to be used 11 times in a program at the moment. We will look at increasing the value in the next release, but you are using it in an unusual way... </i>

Only by including it in the source code too many tiems <img src="smile.gif" width=15 height=15 align=middle><img src="smile.gif" width=15 height=15 align=middle>

Thankfully the code is re-entrant so I've been able to optimise the problem away. A better error message would help even if the limit remains.


<i>Incidentally IPM is 29 and important ;-) </i>

Thought it might be, and there's some pretty odd numbering going on in those SFR's which wasn't what I'd expected using offset-from-zero. I think I've almost got there but it's $B5 which has really got me stumped. I'm guessing it's used as a bit or nibble field, I don't expect any explanation, but if poking $B5 is likely to crash the firmware it would be much appreciated if you could let me know.
 

Technical

Technical Support
Staff member
B5 is the temporary store of 29 during the interrupt (v8.5). There are 4 bytes stored during the interrupt (aka gosub 00).

And no they are not sequential, and do vary between firmware versions, so code written for this firmware may not automatically work on other versions...
 
Top