to make it short: when I am trying to assemble my code I get this
Error: invalid char '[' beginning operand 2 '[esp+4]'
and
Error: invalid char '[' beginning operand 1 '[edx]'
The most relevant code is already in the error, however I got the code from here. To reproduce the error just use this little pattern in .section .text
with the command shown below:
mov edx, [esp + 4]
lidt [edx]
sti
ret
I'm using gcc -m32 -c -o idtasm.o idtasm.S
to assemble.
Thanks to Jester I found a solution: the assembly code was written for nasm so used it with this command: nasm -f elf -o idtasm.o idtasm.S
-f elf is replacing gcc's -c and -m32 if I understood everything right.