I am having trouble with pointing to a address and write in my case a variable of byte in size. This gives me the error “error: invalid effective address”:
mov byte[AX], byte 0x0
After some trail and error i tested the same but with EAX. This compiles just fine:
mov byte[EAX], byte 0x0
What am I missing here?
[AX]is an invalid memory operand specification.The valid 16-bit ones are:
[BP] is formally invalid, but many assemblers will quietly convert it into [BP+0].
See the CPU manual for memory operand encodings and the ModR/M and SIB bytes.