OK, here's my problem: I've a macro and I always get "error: invalid combination of opcode and operands". What the f* is wrong in nasm?!? (My code couldn't be wrong, because nasm compiles it without a fass if it's not in a macro). And, how can I make nasm to print more specific error messages?!? I only got the line number of the macrocall, how can I get the line inside a multiline macro?!?
Here's my code (does not work):
%assign exceptionmask (event | event.hwexception << 2)
%macro exceptionhandler 2
kernel_ex%1:
%if %2
pop ebx
%else
mov ebx, 0
%endif
pushad
movzx eax, %1
shl eax, 4
add eax, exceptionmask
jmp kernel_syscall
%endmacro
exceptionhandler 00h, 0
exceptionhandler 01h, 0
exceptionhandler 02h, 0
[...]
Another code (that's working):
kernel_ex00h:
mov ebx, 0
pushad
movzx eax, %1
shl eax, 4
add eax, exceptionmask
jmp kernel_syscall
Any suggestion would be greatful. And PLEASE, if an error occurs in a multiline macro, print that line number...
Cheers,
Turdus