Sender: nate AT cartsys DOT com Message-ID: <3602D442.80070FCB@cartsys.com> Date: Fri, 18 Sep 1998 14:44:34 -0700 From: Nate Eldredge MIME-Version: 1.0 To: Mthimkhulu Molekwa CC: "'Djgpp List'" Subject: Re: FW: Inline ASM References: <01BDE216 DOT FEF3F280 AT mmolekwa DOT rrs DOT co DOT za> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk Mthimkhulu Molekwa wrote: > Correct me if I'm wrong. Should the above code be: > > asm("movw $0x0003, %%ax\n\t" > "int $0x10\n\t" > : : "%eax"); > > ===> replaced "0x0003" by "$0x0003" Yes. The previous code would have fetched the word from address 0x3 in memory, and loaded it into ax. >and ";" by "\n\t" Not necessary. `as' will accept either as instruction separators. (\n\t looks better if you ever need to look at the asm code, however.) > > MK > ======================================================== > Mthimkhulu Molekwa > Reutech Systems - Stellenbosch > Tel: +27 21 880 1150 > Fax: +27 21 880 1153 > Cell: +27 83 454 1230 -- Nate Eldredge nate AT cartsys DOT com