We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello,
Maybe my question is not unique, sorry for that, but I did't find a solution.
So I gonna ask:
How do I use labels in binary expressions?
For example:
AREA STACK, NOINIT, READWRITE SPACE 0x100 ; Here I declare stack data array STACK_TOP ; Here I place label, that pointing at the end of the stack ; So I can use STACK_TOP in my vector table AREA HEAP, NOINIT, READWRITE SPACE 0x100 ; Here I declare some heap ; HEAP_END ; Here my heap ends ; ; Here I place some data variables ; ... ; Some code MOV32 param1, (SRAM_BB_BASE :OR: (HEAP_END << 5) :OR: (5 << 2)) ; I want to use bit-bang with my first data variable, but asm compiler tells me ; ;main.s(111): error: A1586E: Bad operand types (PC Relative, Constant) for operator OR;
Same thing when I try to mov label from CODE area and clear bit[0] with :AND:.
How should I convert PC Relative to absolute address (constant)?