From: "Alexandre Devaure" Newsgroups: comp.os.msdos.djgpp,gnu.gcc.help References: <39104272 DOT D461E8D8 AT vvm DOT com> <39106CCF DOT 19C26C1E AT unx DOT sas DOT com> <39119F7F DOT 2AFDA7E2 AT vvm DOT com> Subject: Re: embedded 16 bit, real mode, x86 target for gcc? Lines: 36 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 Message-ID: Date: Fri, 05 May 2000 13:46:47 GMT NNTP-Posting-Host: 194.51.236.59 X-Complaints-To: abuse AT proxad DOT net X-Trace: nnrp3.proxad.net 957534407 194.51.236.59 (Fri, 05 May 2000 15:46:47 CEST) NNTP-Posting-Date: Fri, 05 May 2000 15:46:47 CEST Organization: Guest of ProXad - France To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Karl Rasmussen a écrit dans le message : 39119F7F DOT 2AFDA7E2 AT vvm 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? %ebp is a 32bit register ;) > 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 Alex