Cog symbol must be long aligned?
Rayman
Posts: 14,640
in Propeller 2
Ran into this error message while troubleshooting this assembly driver.
I think it's a bug in the prop tool.
Doesn't like me adding in a byte in a dat section after the assembly driver, test1 below.
fname res 3 ' 8+3+1 _hubdata res 1 FIT 496 dat '' singleton spin mailbox 'alignl test1 byte 3 cmd long 0
I guess it thinks it's still part of the cog driver, but it's not.
No error message in Flexprop.
Comments
If it's a hub symbol you need to put an ORGH, otherwise you'll get fun errors where it thinks you're still in cog mode
I added orgh symbol to start of assembly and it still gives this error:
But then you immediately follow the
orgh
with anorg
, putting the assembler right back into cog mode.It is cog code, but with orgh forcing it’s location in hub to be >= $400
Try putting the
orgh
at the beginning of the singleton spin mailbox definition, just before the'alignl
line, since that's what the assembler needs to know will be accessed via hub and can therefore have byte alignment.That does fix Prop Tool error. But, there's already an orgh at the start of the dat section, so not sure why needed.
Also, is there a reason Prop Tool and FlexProp treat this differently?
The ORG changes the assembly memory mode. It con only be one mode at a time, either ORG or ORGH. Probably need the whole source listing to pick out all details.