This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello everyone,
I'm using CCS V6.1 to code some piece of assembly progs.
And I don't know how to achieve the following task:
( ... some code ...)
.asg 0,udict ; a variable to store the next aligned 512 segment boundarie
highMem: ; a label
; here, I would to code something like:
;
; udict = 0x0200 - highMem
; udict = 0x01FF AND udict
; udict = udict + highMem ; finally, the expected result
using only assembler directives.
I can't do that :(,
all I tried did not work.
Any ideas ?
BR
Claude
You need to look at the Assembly Language Tools manual for the processor family you use. They are all available here. I'm pretty sure some combination of the .asg and .eval directives will solve the problem.
Thanks and regards,
-George
Hi George,
I wonder if I do not know this manual by heart ... ;-)
My opinion at this step is this is not possible, and that because highmem label is a relocatable object that eval cannot handle.
I already tried many & many possibilities.
BR
Claude
Unfortunately, the assembler does not have a way to encode expressions such as ...
claude caselles said:; udict = 0x0200 - highMem
; udict = 0x01FF AND udict
; udict = udict + highMem
I apologize for not noticing this earlier.
Thanks and regards,
-George
No problem George :)
I could even code this at run time during init phase.
BR
Claude
Hi,
Just a word to say there is a way to solve this (a bit specific) problem at compile time, as is:
(some code ....)
.align 512
high_mem: ; a label aligned to next 512 segment boundary
BR
Claude