I'm trying to write a simple test-tick counter isr in NASM, and for some reason, it's not compiling. The sample is as follows:
Code: Select all
[BITS 64]
[global tickcount_isr]
tickcount_isr:
push rax
mov rax, [__tickcount]
inc rax
mov [__tickcount], rax
pop rax
iretq
__tickcount dq 0
The error appears twice - once for each time I move to/from rax and occurs whether or not I specify a qword move, or stick align 64 at the top of the source. I am compiling to elf64 and have lots of other .asm source which compiles nicely (although, come to think of it, nothing which attempts moving a variable's value to a 64 bit register).
Can anyone see what am I missing out?
Cheers,
Adam