delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/09/16/17:30:37

From: Endlisnis <s257m AT unb DOT ca>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Inline ASM
Date: Tue, 15 Sep 1998 22:18:37 -0300
Organization: NBTel Internet
Lines: 26
Message-ID: <35FF11ED.FA3327A5@unb.ca>
References: <35FE8291 DOT 37810D2D AT gmx DOT net>
NNTP-Posting-Host: fctnts11c62.nbnet.nb.ca
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Thomas Luzat wrote:
> Hi there!
> 
> I just wanted to start programming in C/C++ and downloaded DJGPP for
> this purpose. Everything is working fine, but I haven't figured out how
> to use inline assembler. That's what I wanted to convert from Turbo
> Pascal to DJGPP:
> 
> asm
>    mov ax,0003h;
>    int 10h;
> end;
> 
> I need just one sample to start. I can't figure out how to do it from
> the docs (maybe you can point me to the right one?)

asm("movw 0x0003, %%ax;"
    "int $0x10;"
    : : "%eax");
-- 
     (\/) Endlisnis (\/)
          s257m AT unb DOT ca
          Endlisnis AT GeoCities DOT com
          Endlis AT nbnet DOT nb DOT ca


- Raw text -


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