Date: Wed, 2 Dec 1998 16:58:18 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Tal Lavi cc: djgpp AT delorie DOT com Subject: Re: Extended ASM (Was: misc questions) In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com On Wed, 2 Dec 1998, Tal Lavi wrote: > I checked the info's, but I'm still not that sure what "rI", "rm" does > I *think* that rI is a register which holds an integer value, but what does > "rm" do? These are called ``constraints''. There's a whole bunch of them, but unfortunately the GCC docs only explain some. > Can anyone tell me what does > %w0 , %w1, %k2 & .byte 0x64 means? The first are constraints again, and ".byte 0x64" causes the assembler to emit 0x64 into the binary code. 0x64 is the op-code for FS: prefix override (meaning the next instruction uses offsets into the segment whose selector is in the FS register). sys/farptr.h uses a byte constant because early versions of Gas didn't support prefixes (I'm not sure how the things are with Binutils 2.8.1). > Is there a complete extended asm giude somewhere? Search the mail archives (http://www.delorie.com/djgpp/mail-archives/) for a message posted by Salvador Eduardo Tropea (SET) about a month or two ago, with the subject "CONSTRAINTS" (I think). There's a full list of all the constraints known to man in that message ;-). As for the other parts of the black art of inline assembly, there's nothing apart of the GCC docs and the tutorial pointed to by the FAQ (sections 17.1 and 18.13). If you have already studied those, you will have to ask further questions here.