www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/08/07/13:45:16

Xref: news2.mv.net comp.os.msdos.djgpp:6764
From: Orco <mar AT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Inline ASM : "Error: operands given ..."
Date: Thu, 1 Aug 1996 21:31:04 +0100
Organization: Orco
Lines: 31
Distribution: world
Message-ID: <mG+RRBAIQRAyEwlb@demon.co.uk>
References: <4tlo26$8cb AT srvr1 DOT engin DOT umich DOT edu>
NNTP-Posting-Host: gorge.demon.co.uk
MIME-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

>
>       ASM("                                   \n
>               pushw %%es                      \n 
>               movw _our_global_selector, %%es \n 
>--------------> movw %%es, %%ds                 \n 
>               movl $0xA0000, %%edi            \n 

Looks like your problem is that you are trying to move data from a 
segment register to another segment register without using an
intermediate register...

        try something like
                movw %%es ,%%ax
                movw %%ax, %%ds

        You could try re-arranging the opcodes slightly so that they
pair.

>               imulw $320, %%ax                \n 
>               addw %%bx, %%ax                 \n 
>--------------> addw %%ax, %%edi                \n 
>               next_line:                      \n
>--
>-----------------------------------------------------------------------------
> David M. Barrett :)         |     University of Michigan / CAEN Hotline
> dbarrett AT engin DOT umich DOT edu    | http://www-personal.engin.umich.edu/~dbarrett
>-----------------------------------------------------------------------------
-- 
Maidul Alam Rahman

mar AT gorge DOT demon DOT co DOT uk

- Raw text -


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