(New trap in propeller assembly) Not a trap, Just a typo
stevenmess2004
Posts: 1,102
If you do this
The compiler complains that it can't find otherLabel at the JMP line. I presume that this is because anotherLabel breaks it up into a different section. Just something to watch out for if you are doing overlays.
Post Edited (stevenmess2004) : 3/15/2008 8:58:52 AM GMT
DAT org 0 '...some code aLabel MOV 0,0 anotherLabel MOV 0,0 org aLabel :otherLabel MOV 0,0 MOV 0,0 MOV 0,0 JMP #:otherLabel
The compiler complains that it can't find otherLabel at the JMP line. I presume that this is because anotherLabel breaks it up into a different section. Just something to watch out for if you are doing overlays.
Post Edited (stevenmess2004) : 3/15/2008 8:58:52 AM GMT
Comments
This seems to compile fine. And it looks fine, too. I'm using version 1.05.8.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chip Gracey
Parallax, Inc.
I tried to cut it down to something simple and didn't check it...
Anyway, this file shows the problem. Right down near the bottom there is a line with the label :loop1 and a bit further down there is a JMP that calls it. If you remove the ':' it works.
I'll try and see if I can find a smaller example or cut this down to the smallest thing that causes the error. I had to add the .txt to upload the file.
Post Edited (stevenmess2004) : 3/15/2008 8:04:48 AM GMT
You meant to type "if_nz", but you typed "in_nz", which was interpreted as a non-local label:
······················· ADD···· loopC1,#1
······················· CMP···· loopC1,#12····· wz
······· in_nz·········· JMP···· #:loop1
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chip Gracey
Parallax, Inc.
Edit: Hey Chip, for the propeller II can you add a feature to the compiler so that it knows what you meant to type and not what you actually typed?
Post Edited (stevenmess2004) : 3/15/2008 9:02:05 AM GMT