Using labels outside assembly area region in assembly area region
The Wangster
Posts: 13
I want to use the address of a place in hub memory (which is a label) in assembly. I have this:
But Propeller tool won't let me do that. It says "address is not long". Is there a workaround for this?
Thanks.
DAT alabel word $0 ... org ... some assembly code here ... long alabel
But Propeller tool won't let me do that. It says "address is not long". Is there a workaround for this?
Thanks.
Comments
firstly, you should be to declare a variable in hub (main) memory and can do this in the VAR section.
Secondly, you have to pass the address of this variable to your assembly code using the second parameter of cognew statement, e.g. cognew(@entry, @alabel).
In your example code your word variable is located before the ORG statement, but I don't know how it would be handled by the compiler. You must use #alabel at long statement when you will have the address of alabel.