delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/17/12:03:46

From: qball1723 AT aol DOT com (QBall1723)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Inline Assembler in DJGPP
Date: 17 Nov 1997 16:18:58 GMT
Lines: 37
Message-ID: <19971117161801.LAA23445@ladder02.news.aol.com>
NNTP-Posting-Host: ladder02.news.aol.com
Organization: AOL http://www.aol.com
References: <19971104194301 DOT OAA20947 AT ladder02 DOT news DOT aol DOT com>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

>Anyway, I wanted to know the syntax for inline assembly in DJGPP.  I am
>trying
> to port some of my code from Borland C++ which uses a for as follows:
>
>asm {
>   mov  ax, bx
>   int   10h
>}
>
>or whatever.  Could someone please help me?  Thanks.
> 

... well with the assembly... you have to reverse the source & destination...
 and also add a size suffix (I think) to the command (i.e. mov, add, whatever),
 and precede the registers with %...

    movw %BX, %AX    - same as Intels syntax: mov ax,bx

I'm trying to think of places for tuts... but I'll tell you what.... just goto
 The Game Programming Megasite.. and find the DJGPP Game Programming
 Tutorials....

       ... there's a smallish DJGPP assembly tutorial.... I'm just starting
 myself... 

   the URL of the Game Programming MegaSite:

         http://members.aol.com/mreiferson

  Good luck!

    

     
Jim the loiterer
http://members.aol.com/qball1723/index.htm
(I make games)

- Raw text -


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