delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/03/03:45:39

From: "Böhme Uwe" <uwe AT hof DOT baynet DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: asm ?'s
Date: Sat, 01 Aug 1998 15:20:58 +0200
Organization: Bingo (Buergernetz Ingolstadt eV)
Lines: 39
Message-ID: <35C3163A.940D1BA2@hof.baynet.de>
References: <35c30b1e DOT 19903189 AT newsreader DOT 2xtreme DOT net>
NNTP-Posting-Host: port97.hof.baynet.de
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

> 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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019