Mail Archives: djgpp/1998/08/03/03:45:39
> Hi, I just started reading "Tricks of the game programming gurus" and
> they start-out with a cahapter on asm. Some one told me that in order
> to have djgpp do in-line asm, I would have to use this format:
>
> asm{
> code
> }
>
> I know nothing about asm and would appreciate anyone's advice on the
> matter. The tutorial was made for use with MASM(which I do not own),
> and uses .model and .code. Someone told me not to include these
> statements in my code section as above. I am not sure what the heck I
> am doin. Here i s a sample of what i did:
>
> asm{
> integer_1 EQU [BP+6]
> integer_2 EQU [BP+8]
>
> PUBLIC _Add_Int
> _Add_Int PROC FAR
> push BP
> move BP, SP
> move AX, integer_1
> add AX, integer_2
> pop BP
> _Add_Int ENDP
> END
> }
>
> Is this the right format?
No! It's intel.
DJGPP uses AT&T.
Read
file:djgpp/faq/djgppfaq.html#Converting ASM
Uwe
- Raw text -