| delorie.com/archives/browse.cgi | search |
| Xref: | news-dnh.mv.net comp.os.msdos.djgpp:3942 |
| Path: | news-dnh.mv.net!mv!barney.gvi.net!news.netrail.net!arther.castle.net!micro.internexus.net!news.sprintlink.net!newsfeed.internetmci.com!in2.uu.net!tank.news.pipex.net!pipex!sunsite.doc.ic.ac.uk!yama.mcc.ac.uk!cs.man.ac.uk!t3b!molyneua |
| From: | Andy Molyneux <molyneua AT cs DOT man DOT ac DOT uk> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: DJGPP: Inline assembly? |
| Date: | Fri, 15 Dec 1995 14:53:40 +0000 |
| Organization: | Dept of Computer Science, University of Manchester, U.K. |
| Lines: | 25 |
| Message-ID: | <Pine.SUN.3.91.951215145127.728B-100000@t3b> |
| References: | <4apphs$las AT micro DOT internexus DOT net> |
| NNTP-Posting-Host: | t3b.cs.man.ac.uk |
| NNTP-Posting-User: | 15092 |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
On 14 Dec 1995, Laszlo Vecsey wrote:
> I was surprised to find that there is no "asm { }" command in DJGPP.
> Will this feature ever be added? I prefer working with occasional inline
> code instead of calling external procedures.
>
There is support for inline code, using the construct:
asm ("
... assembly code here ...
");
Trouble is, this doesn't let you refer to local variables or parameters
passed to the current function (which I believe BCC's asm{} does) and the
assembler syntax requires operands "backwards" amongst other bizarre
features.
If you're really interested, I could send you an example of inline
assembly in DJGPP.
- Andy
| Andrew Molyneux Internet: molyneua AT cs DOT man DOT ac DOT uk
| University of Manchester Tel : (+44)161-485-3291
| REAL programmers write a=b!=4?b%2?c:d:e without even
| thinking about it :-)
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |