From: dontmailme AT iname DOT com (Steamer) Newsgroups: comp.os.msdos.djgpp Subject: Re: MASM coff images Date: Sun, 28 May 2000 09:52:33 GMT Organization: always disorganized Lines: 56 Message-ID: <3930ec5c.5410549@news.freeserve.net> 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> <047b193f DOT 5a9c24f0 AT usw-ex0101-006 DOT remarq DOT com> NNTP-Posting-Host: modem-18.singapore-angel.dialup.pol.co.uk X-Trace: newsg4.svr.pol.co.uk 959507555 31545 62.136.220.18 (28 May 2000 09:52:35 GMT) NNTP-Posting-Date: 28 May 2000 09:52:35 GMT X-Complaints-To: abuse AT theplanet DOT net X-Newsreader: Forte Free Agent 1.11/32.235 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Dogansmoobs wrote: >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, (Yes - the first three lines of VGA.ASM should start with a dot.) >it's not there in the actual code. The code >compiles fine, with no errors or warnings. > >VGA.ASM::::::::::::::::::::::: >486 >MODEL MEDIUM,C As I said before, you can't do this. You need a flat memory model. In particular, medium model code uses far returns, but you need near returns. >CODE > >PUBLIC _setVga ;I have tried this with and without the undescore The underscore is necessary. >_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 You can't call real-mode BIOS interrupts directly from 32-bit protected mode and expect it work. (You can do it via DPMI though - see the FAQ.) >END >And the C file that I have tried to link it with is like so: The C code looked OK (except that I think you need to use textprintf instead of printf to print to a graphics screen). >gcc vgatest.c vga.obj -Wall -g -o vgatest.exe Probably you need to rename vga.obj to vga.o, as I'm not sure that gcc recognises .obj as an object file extension. S.