www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/16/21:22:15

From: B Hodge <bhodge AT gpu DOT srv DOT ualberta DOT ca>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: beginner inline assembly problem
Date: 16 Jun 1998 03:38:58 GMT
Organization: University of Alberta
Lines: 25
Message-ID: <6m4pci$j7s$1@pulp.ucs.ualberta.ca>
References: <3585D17E DOT 4F15 AT mailexcite DOT com>
NNTP-Posting-Host: gpu1.srv.ualberta.ca
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Try: movw $5, %ax\n\t
on the 1st line

Bob Berkawitz <oonly AT mailexcite DOT com> wrote:
> When I try to compile this I get the this error "13:Error: operands
> given don't match any known 386 instruction" 
> Here is the code:
> int x;
> void main()
> {
>         asm("movw 5, %ax\n\t"
>             "movw %ax, $_x");
> }
> What am I doing wrong?

> Thanks in advance.

-- 
 _     ___
#_~`--'__ `===-,   +-----------------------------------+
`.`.     `#.,//    |            Blaine Hodge           +
,_\_\     ## #\    |     bhodge AT gpu DOT srv DOT ualberta DOT ca    |
`__.__    `####\   |       blaine AT cs DOT ualberta DOT ca       |
     ~~\ ,###'~    |  http://www.ualberta.ca/~bhodge/  |
        \##'       +-----------------------------------+

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019