delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/10/20:47:40

Date: 11 May 98 00:28:31 GMT
Message-ID: <wanpsm98.894846511@octarine>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Inline assembley? is it possible?
References: <01bd7c0b$83fca8e0$adef41c2 AT default>
From: wanpsm98 AT octarine DOT cc DOT adfa DOT oz DOT au (WANKADIA PAUL SAPAL MICHAEL)
NNTP-Posting-Host: 131.236.253.20
Lines: 22
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

"Dark Angel" <mop45440 AT mail DOT telepac DOT pt> writes:

> asm { instructions...
> };
>why doesn't this work? Is inline assembley in DJGPP diferent from Turbo C?

A couple of URLs about DJGPP inline ASM got posted within the last couple of
days ... if you missed them, someone is bound to post 'em again anyway ...

In summary, though, you say something like

asm("
	cli;
	nop;
	sti;
");

Keep in mind that the ASM will be AT&T syntax ... NOT Intel syntax ...

If you want to use extended inline ASM (i.e. if you clobber any registers and
need to tell gcc or if you need to access non-global variables), look at the
guides (whose URLs I mentioned above).

- Raw text -


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