delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/01/28/11:18:29

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
Date: Mon, 28 Jan 2002 18:17:09 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Joel Saunders <jbs30000 AT aol DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Inline assembly.
In-Reply-To: <fa9bfb1b9e164c8e7b3ecc848e67eadc.62691@mygate.mailgate.org>
Message-ID: <Pine.SUN.3.91.1020128181530.29128C-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Mon, 28 Jan 2002, Joel Saunders wrote:

> main(void)
> {
>         __asm__("
>                  movw My_Name, %si
>                  movw Screen_PTR, %di
>                  movw $7, %ecx
>                  movsb
>         ");
>         return 0;
> }
> -[_]--------------------------- Message Window --------------------
>  Creating: nptest.exe
>  Error: nptest.o: In function `main':
>  nptest.cpp(6) Error: undefined reference to `My_Name'
>  Error: nptest.cpp(.text+0xd): undefined reference to `Screen_PTR'
>  There were some errors
> 
> What did I do wrong?

In addition to what Hans-Bernhard wrote, I'd like to mention section 
18.12 in the DJGPP FAQ list: it includes pointers to relevant parts of 
the documentation that you are advised to read before using inline 
assembly.

- Raw text -


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