Request a 'res' compiler warning.
James Newman
Posts: 133
It would be nice if the ide or compiler would output some sort of warning when you have a 'res' anywhere before the end of the asm.
Yep, just copy-pasted a few asm routines from an old project, and spent hours trying to figure out why it was locking up my cog. Had a rogue res trampling all over my code.
In the back of my head I knew it was a possible problem, but it's been a while since I've been acquainted with the prop, and it's an easy thing to miss in a cogs worth of asm. It should be caught by the ide/compiler imo.
Yep, just copy-pasted a few asm routines from an old project, and spent hours trying to figure out why it was locking up my cog. Had a rogue res trampling all over my code.
In the back of my head I knew it was a possible problem, but it's been a while since I've been acquainted with the prop, and it's an easy thing to miss in a cogs worth of asm. It should be caught by the ide/compiler imo.
Comments
-Phil
It could issue an advisory statement perhaps?
This is one of few common mistakes, I don't have a problem with. I always think of res as meaning "end of PASM section".