NASM - The Netwide Assembler

NASM Forum => Programming with NASM => Topic started by: ben321 on January 05, 2017, 10:43:03 AM

Title: Compiling bug
Post by: ben321 on January 05, 2017, 10:43:03 AM
Not sure where to put this bug report, so I'm putting it here.
The 16bit instruction MOV AX,[SP+4] isn't working. Even though I have the assembler in 16bit mode, by using the BITS 16 pseudo instruction. It's giving me an "invalid effective address" error. It won't work until I change the instruction to MOV AX,[ESP+4]. Then it compiles without error, but of course then it adds a prefix byte (0x67) in front of the opcode to indicate that the address being specified is 32bits, when the system is in 16bit mode. Please fix this bug and release a new version of NASM as soon as possible.
Title: Re: Compiling bug
Post by: Frank Kotler on January 05, 2017, 05:08:16 PM
Please review 16-bit effective addresses, Ben321.

Best,
Frank