delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/05/04/13:28:12

From: Karl Rasmussen <karl AT vvm DOT com>
Newsgroups: comp.os.msdos.djgpp,gnu.gcc.help
Subject: Re: embedded 16 bit, real mode, x86 target for gcc?
Date: Thu, 04 May 2000 11:04:16 -0500
Organization: CompuServe Interactive Services
Lines: 26
Message-ID: <39119F7F.2AFDA7E2@vvm.com>
References: <39104272 DOT D461E8D8 AT vvm DOT com> <39106CCF DOT 19C26C1E AT unx DOT sas DOT com>
NNTP-Posting-Host: firewallext.tx.acer.com
Mime-Version: 1.0
X-Trace: ssauraaa-i-1.production.compuserve.com 957456257 26042 206.175.72.226 (4 May 2000 16:04:17 GMT)
X-Complaints-To: newsmaster AT compuserve DOT com
NNTP-Posting-Date: 4 May 2000 16:04:17 GMT
X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.14-15mdk i686)
X-Accept-Language: en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Brian Dean wrote:
> 
> Karl Rasmussen wrote:
> > [need to generate 16 bit code from C]
> 
>         asm(".code16");
> 

Brian,

	Thanks for the reply. I had passed over this as only for inline asm.
When I tried this with a C file it did not work, I got assembler errors
complaining that 
	movb %al,-5(%ebp)
	...

etc., were not valid 16 bit base/index expressions (accessing a local).
Did I miss something else? 
This line was generated to store a byte into a local unsigned char, so I
don't think its a case of needing to rewrite my example (ie. I'm not
using long's).

Thanks,

Karl Rasmussen
karl AT vvm DOT com

- Raw text -


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