From: 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 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 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII 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 Precedence: bulk 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" > To: "lewi9908" > Sent: Sunday, December 01, 2002 1:11 PM > Subject: Re: AT&T inline asm in DJGPP... > > > > In article lewi9908 > 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