Mail Archives: djgpp/1998/10/28/17:55:07
John S. Fine wrote:
>
> Jeramie Hicks wrote:
> > .model TINY
> > .386
> > .code
> > equalfive proc
> > mov eax, 5
> > ret
> > equalfive endp
> > end equalfive
> Regardless, you first
> need to make the assembler generate 32-bit code rather than 16-bit
> code. The cleanest way to do that is get rid of the ".model" and
> ".code" directives and write your own SEGMENT directive including
> "USE32" to make sure it is making 32-bit code.
I forgot to mention that it is even easier if you switch assemblers.
NASM is free, it does only and exactly what you tell it to do. All
you need is a segment directive with USE32 and it can produce a 32-bit
FLAT COM file with no linker and none of the confusing directives.
In support of my assertion that ".model TINY" and Microsoft's
other "simplified" directives are more confusing, rather than
simpler, I have seen many people post code for which their primary
problem was misuse of those directives. That is less common in
NASM, (though several people _have_ misused "BITS 32" in NASM
when they should have used "USE32"). BTW, sorry I drifted so far
off topic for djgpp.
--
http://www.erols.com/johnfine/
http://www.geocities.com/SiliconValley/Peaks/8600/
- Raw text -