From: beppu AT rigel DOT oac DOT uci DOT edu (John Beppu) Newsgroups: comp.os.msdos.djgpp Subject: Re: NASM Date: 5 Jan 1997 09:33:39 GMT Organization: University of California, Irvine Lines: 37 Message-ID: <5anshj$ijc@news.service.uci.edu> References: <199701060350 DOT EAA06726 AT math DOT amu DOT edu DOT pl> NNTP-Posting-Host: rigel.oac.uci.edu To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp >> 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 nasm -f coff */ -- beppu AT uci DOT edu .............................................................