Annoying PropTool 1.2 Bug/Feature
hippy
Posts: 1,981
This fails to compile ...
This works ...
Obviously there is a workround but it's not aesthetically pleasing.
Added : Dang ! @var1 and @var2 are given the same value
Post Edited (hippy) : 9/1/2008 8:25:34 PM GMT
PUB GetVar1Address | a1, a2 a1 := @var1 a2 := @var2 DAT org $000 var1 res 1 var2 res 1
This works ...
PUB GetVar1Address a1 := @var1 a2 := @var2 DAT org $000 var1 res 1 var2 res 1
Obviously there is a workround but it's not aesthetically pleasing.
Added : Dang ! @var1 and @var2 are given the same value
Post Edited (hippy) : 9/1/2008 8:25:34 PM GMT
Comments
Post Edited (Mike Green) : 9/1/2008 6:25:28 PM GMT
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Still some PropSTICK Kit bare PCBs left!
The behaviour makes some sense in so far that @var1 and @var2 will be correct hub addresses for something like this ...
IMO, @label should give the hub address the cog location was loaded from, or would have been loaded from.
It would also be useful to have @$label to get the cog location ( "$" being the 'current cog location counter ) which as Mike notes is missing.
Your first example would make sense, assuming @var1 == @var2 == 0. I can see the logic of flagging it as an error, though, since a beginner might erroneously expect the RES to reserve space in cog memory. I like the @$label idea and can see where it would come in handy. Not even the following would give the desired result in the present framework (the error notwithstanding):
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Still some PropSTICK Kit bare PCBs left!
The code I now have is ..
Whereas I was using "cogAddress = ( @label - @PASM_BASE ) >> 2" I'm now using "@OVERLAY_label" when needed and -