delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/17/00:52:42

Date: Mon, 16 Mar 1998 17:57:59 -0800 (PST)
Message-Id: <199803170157.RAA24218@adit.ap.net>
Mime-Version: 1.0
To: langtons AT NOTTHISBIT DOT manawatu DOT gen DOT nz (Michael Langton), djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: Syntax of "asm" statement

At 10:06  3/16/1998 GMT, Michael Langton wrote:
>Hello,
>I'm used to putting assembler statements into my programs using asm.
>But I can't figure out the (apparently) different syntax under djgpp.
>Here's a simple thing I would like to be able to do (this works fine
>under bc3):
>
>asm {
>	mov	ax, 0x0013
>	int	0x10
>}

Read FAQ section 18.13, which talks about GCC's different asm syntax. In
this case, it would look like:

asm("movw $0x0013, %%ax;"
    "int $0x10");

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


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