Mail Archives: djgpp/1997/01/05/05:34:46
>> 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
This is something I like to do using CPP+NASM.
#define b byte
#define w word
#define d dword
mov eax,d [edi+ecx*2+0x010]
add edx,b 30
/* if your constant is betweeen +127 and -128, then
be sure to let NASM know. If the instruction
supports it, the byte-sized constant will be sign-
extended into a full 16bit or 32bit value.
This results in a size optimization. The size of the
instruction "add edx,30" was reduced by 3 bytes just
by telling NASM that 30 is a valid signed char.
Turbo Assembler would make this optimization without
being asked.
Be sure you run CPP with the -P option.
cpp -P <src> <dst>
nasm -f coff <src>
*/
--
beppu AT uci DOT edu .............................................................
- Raw text -