Mail Archives: djgpp/1997/01/06/17:33:20
Once upon a time (on 4 Jan 97 at 20:42) Nikita Proskourine said:
>
> Thanks, I already got NASM from one of SimTel mirrors. It seems like
> a really good way to use old .asm code with djgpp, but I got a
> problem: it doesn't seem to recognize "mov byte ptr". What am I
> doing wrong? Oh, another thing, how do I define stack size in my asm
MOV BYTE PTR [whatever],0x05 won't work
for some reason they changed it to
MOV BYTE [whatever],0x05
Same with PUSH 0xFFFF you need PUSH WORD 0xFFFF.
I guess they thought that the could reduce typing by cutting
out the unnessecery PTR keyword.
so for BYTE PTR, WORD PTR, DWORD PTR just charge it to
BYTE, WORD, DWORD. Its all in the documentation.
Look though the docs that come with it, NASM uses some slight
differences from what you may expect from most intel assembliers.
By the way you probably won't have to touch things like A16,A32,O16,O32
as well as things like MOV AX,[WORD ES:DI] as the previous repley
states,
these things are mainly needed for mixing 16bit and 32bit code.
Having WORD *in* the brackets causes it to use the pointer as a 16bit
pointer instead of using the variable it points to as a 16bit sized
variable.
And 'A32 MOVSW' will make it use EDI and ESI while 'A16 MOVSW'
will make it use DI and SI however using [BITS 16] or [BITS 32] once
sets
up a default so if you set [BITS 16] a plain 'MOVSW' will automatically
use
SI and DI.
Jens.
- Raw text -