I need to set the highest bit of some label address/offset.
I tried:
test.nasm:
BITS 32
dw mylabel | 0x8000
mylabel:
dd 0
But when trying to assemble this I get:
nasm -f bin test.nasm
test.nasm:3: error: `|' operator may only be applied to scalar values
Why doesn't it see mylabel as a scalar value? I thought labels are just replaced with their address (scalar value) by the assembler.
I'm using nasm v 2.09.04 if that matters.
Thanks in advance for any help.
EDIT: I've been able to use + instead of |. It looks as if the bitwise operators don't work on labels. What do you think, is this on purpose or a bug?