From: ggerard AT iname DOT com (Gregory Gerard) Newsgroups: comp.os.msdos.djgpp Subject: question about inline asm not answered in FAQs (or pseudo FAQs) Message-ID: X-Newsreader: MT-NewsWatcher 2.4.4 X-Face: 8b[O#_YSJ$C:ZMh\DC?"A`o]Q?"dT`YVBG~"#WND}\I0sYR,,M0]MC Date: Thu, 04 Nov 1999 00:07:38 -0800 NNTP-Posting-Host: 216.101.242.90 X-Complaints-To: abuse AT swbell DOT net X-Trace: typhoon01.swbell.net 941703012 216.101.242.90 (Thu, 04 Nov 1999 00:10:12 PST) NNTP-Posting-Date: Thu, 04 Nov 1999 00:10:12 PST Organization: SBC Internet Services Lines: 18 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I could not find the answer in any of the FAQs I've seen floating around which cover the subject of inline asm in gcc, nor could I find the answer in the docs, so I thought I'd ask here. I may be blind though... okay, one of the inputs to my __asm__() block is a unsigned char (1 byte) in position 0. I can refer to the upper and lower portions of the register that got assigned by saying %b0 and %h0 and the register as word by saying %w0. However, when I go to do a 32-bit op (say, shll %16, %0), I get an error because %0 gets plugged as %bl. I learned about %w, %h, and %b by looking at other asm examples but I haven't come accross any code that has this situation and I can extract the key. What's the answer and where do I find full descriptions of how inline asm is done with a target of i386 (the 68k examples in the GNU docs are pretty weak.) thanks, greg