delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/12/01/19:26:34

From: <ams AT ludd DOT luth DOT se>
Message-Id: <200212020026.gB20QDV26749@speedy.ludd.luth.se>
Subject: Re: AT&T inline asm in DJGPP...
In-Reply-To: <000901c29997$7ae42a40$58c6ff40@thefilesystem> "from lewi9908 at
Dec 1, 2002 04:12:00 pm"
To: lewi9908 <lewi9908 AT ghc DOT ctc DOT edu>
Date: Mon, 2 Dec 2002 01:26:13 +0100 (CET)
CC: djgpp AT delorie DOT com
X-Mailer: ELM [version 2.4ME+ PL78 (25)]
MIME-Version: 1.0
X-MailScanner: Found to be clean
X-MailScanner-SpamScore: s
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

Sorry. I mistakenly did reply instead of follow-up. So I CC the mail
news gateway so we get back in the newsgroup which is the way I prefer
to handle this.

According to lewi9908:
[ Charset ISO-8859-1 unsupported, converting... ]
> > : They both say cmds output to screen
> >
> > I don't understand the line above.
> I meant - Both nm... cmds for each of the ".o" file outputs the same thing
> to DOS screen

That's a problem. You should get different output, not the exact
same. But the name must match.

> Well the the label _OutputText in Ker.asm is suppose to be the function that
> the function that the call in main() in ker.cpp is suppose to call. So
> Ker.asm defines the function and Ker.cpp needs to find it...
> 
> Also I tried to see what causes the error msg and found that only if the
> actual call in main() to OutputText is commented out the the program will
> link...
> 
> Here is what I mean...
> 
> extern "C" void OutputText(char* pOutStr, int iVideoMemIndex);
> 
> int main()
> {
>     //OutputText("Hello, world!", 22);     //error if uncommented...
>     return 0;
> }

Yes. And verifying the output with nm should tell us more.

> I went and found the site the I got syntax from
> http://www.osdev.org/developers/guide01/index.html#Mixing. The link takes
> you to the middle of the page and there it discusses the "_" for function
> and gobal data then how the stack should be mangage by caller and callee and
> then the example I am talking about...
> 
> I hope this help...
> 
> Any more help...
> 
> ----- Original Message -----
> From: "Martin Str|mberg" <ams AT ludd DOT luth DOT se>
> To: "lewi9908" <lewi9908 AT ghc DOT ctc DOT edu>
> Sent: Sunday, December 01, 2002 1:11 PM
> Subject: Re: AT&T inline asm in DJGPP...
> 
> 
> > In article <uukobqk99s50cb AT corp DOT supernews DOT com> lewi9908
> <lewi9908 AT ghc DOT ctc DOT edu> wrote:
> > : They both say cmds output to screen
> >
> > I don't understand the line above.
> >
> > : File STDIN:
> > :                 U _OuputText
> >
> > : Note: I use "nasm ... -o KerASM.o ... so the output files are
> different...
> >
> > If what you say above is right you don't have OutputText in any of the
> > .o files, but both of the .o files needs a function called OuputText
> > for some reason.

1. Your function name is wrong.

2. Both files wants to use the function OuputText (or
_OuputText). None of them defines it.

At least that's what I can say from the information you've
provided. 

Note that if you give bad information (mispellings; not complete like
U twice) you won't get any information that helps you. 


Right,

						MartinS

- Raw text -


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