Mail Archives: djgpp/2002/12/01/19:26:34
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 -