| www.delorie.com/archives/browse.cgi | search |
| Xref: | news-dnh.mv.net comp.os.msdos.djgpp:785 |
| Newsgroups: | comp.os.msdos.djgpp |
| Path: | news-dnh.mv.net!mv!news.sprintlink.net!hookup!nntp-hub2.barrnet.net!newshost.ea.com!psinntp!psinntp!psinntp!psinntp!netrixgw.netrix.com!jasmine!ld |
| From: | ld AT jasmine DOT netrix DOT com (Long Doan) |
| Subject: | Re: inline assembly problem |
| To: | guest AT dstn02 DOT dct DOT ac DOT uk (Guest) |
| Sender: | ld AT jasmine (Long Doan) |
| Organization: | Netrix Corporation |
| References: | <1995Jul4 DOT 131029 DOT 18620 AT zippy DOT dct DOT ac DOT uk> |
| Date: | Wed, 5 Jul 1995 12:07:02 GMT |
| Lines: | 29 |
| Dj-Gateway: | from newsgroup comp.os.msdos.djgpp |
In article <1995Jul4 DOT 131029 DOT 18620 AT zippy DOT dct DOT ac DOT uk>, guest AT dstn02 DOT dct DOT ac DOT uk (Guest) writes:
|> Hi,
|>
|> I have just installed djgpp with gcc version 2.6.3 with maintenance
|> releases dj112m1.zip - dj112m4.zip and I am trying to compile C code
|> with inline assembly and setting x86 registers but without any sucess.
|> I have the file below to try and set the AX register (as a simple
|> example):
|>
|> m.c
|> ---
|> main() {
|>
|> _AX = 0;
|> }
[Snipped]
You might want to try:
main (void)
{
asm ("movw $0x0, %ax");
}
(Be careful about changing registers' values. It might confuse gcc.)
Hope that helps,
Long.
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |