From: yorka AT dlc DOT fi (Atte Koivula) Newsgroups: comp.os.msdos.djgpp Subject: Re: Inline ASM: movsx? Date: Thu, 28 May 1998 21:23:36 GMT Organization: Majik Lines: 32 Message-ID: <356ed3e8.28967556@news.dlc.fi> References: NNTP-Posting-Host: kou83.pp.dlc.fi Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk GNU assembler doesn't recognize the instructions "movzx" or "movsx". Instead, the equivalent for "movzx" for example is "movzXY", where "X" is the size of the from-operation and "Y" for the destination-operation, for example movzwl (w == word, l == dword/long, ie. from word to long). I would give you the exact rules about using all "mov with X extention" -opcodes under GAS, but I seem to have forgotten most of them as I've not-so-recently moved from inline asm to NASM. Anyway, I hope this was of help. - Atte "Yorka" Koivula On Wed, 27 May 1998 03:36:38 GMT, krian AT umich DOT edu (Krian U) wrote: >Hi, > >I've recently started using inline assembly in DJGPP (GCC 2.8.1), and I ran >into this problem. >Instructions like movsx and movcx give an "unrecognized 386 instruction" >error. Is there a way I can use inline assembly with the 486 or later >instruction set? I can't seem to find much info on GCC inline asm in the FAQ >or around the web. > >Another quick question: >I believe this may have been asked many times before, but I was wondering if >there is a way to access local variables in inline asm, without having to pass >them in as arguments, or fiddling around with the bp. > >Any help would be much appreciated, > >-Krian