delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/05/27/21:30:20

X-Originating-Host: 63.21.240.247
Organization: http://www.remarq.com: The World's Usenet/Discussions Start Here
Subject: Re: MASM coff images
Lines: 71
From: Dogansmoobs <dogansmoobsNOdoSPAM AT hotmail DOT com DOT invalid>
Newsgroups: comp.os.msdos.djgpp
Message-ID: <047b193f.5a9c24f0@usw-ex0101-006.remarq.com>
References: <04039b30 DOT 28983095 AT usw-ex0101-008 DOT remarq DOT com> <39301ea2 DOT 9896444 AT news DOT freeserve DOT net> <097c68c0 DOT 5c25a710 AT usw-ex0103-023 DOT remarq DOT com> <39303c06 DOT 17422431 AT news DOT freeserve DOT net>
Bytes: 1963
X-Wren-Trace: eBw5ERAJTgRPWAcTGFIOGAEADgo5EFMeFBEaE1sLClFTTA9TQA1HQERNVktGCw==
Date: Sat, 27 May 2000 18:15:43 -0700
NNTP-Posting-Host: 10.0.2.6
X-Complaints-To: wrenabuse AT remarq DOT com
X-Trace: WReNphoon3 959477252 10.0.2.6 (Sat, 27 May 2000 18:27:32 PDT)
NNTP-Posting-Date: Sat, 27 May 2000 18:27:32 PDT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

>Try a very simple example to start with.  If it doesn't work
then
>post everything here (the entire .asm file, the entire .c file,
>the command lines used for both gcc and MASM).  Eli says in the
>FAQ that he needs more information about how to use MASM with
>DJGPP, so it would be useful to see exactly what problems you
>may have.

Ok, this is the only asm file that I have tried this with.  I am
on a different computer than the one I program on, so if there
are any mistakes, it's not there in the actual code.  The code
compiles fine, with no errors or warnings.

VGA.ASM:::::::::::::::::::::::
.486
.MODEL MEDIUM,C
.CODE

PUBLIC _setVga  ;I have tried this with and without the undescore
_setVga PROC C
  mov ah, 0
  mov al, 13
  int 10
  ret
_setVga ENDP

PUBLIC _setText
_setText PROC C
  mov ah, 0
  mov al, 3
  int 10
  ret
_setText ENDP

END

And the C file that I have tried to link it with is like so:
#include <stdio.h>

/* These next 2 function prototypes I have changed a few times.
I have tries them with and without the underscore, without
extern, and without them at all, even though I knew that
wouldn't work. I have also tried them is a separate header file,
even though I didn't think that would work either. */

extern void setVga();
extern void setText();

int main()
{
 setVga();
 printf("Hello World.");

 setText();
 return 0;
}

After I compile the vga.asm file, I get vga.obj.  I compile and
link with this command:

gcc vgatest.c vga.obj -Wall -g -o vgatest.exe

This goes fine, it accepts vga.obj, but it says undefined
refrence to setVga() and setText().  Ok, that's as much detail
as I can possibly give.  I hope we can figure this out.

 - Dogamsmoobs
There are no times that don't have moments like these.

* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!

- Raw text -


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