Mail Archives: djgpp/2000/05/27/21:30:20
>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 -