| www.delorie.com/archives/browse.cgi | search |
| From: | "David Mitchell" <dmitchell AT inet DOT net DOT nz> |
| Newsgroups: | alt.lang.asm,comp.os.msdos.djgpp,comp.os.msdos.programmer |
| Subject: | NASM + DJGPP linking |
| Date: | Tue, 29 Jun 1999 14:05:57 +1200 |
| Organization: | Inet Ltd, Christchurch, New Zealand |
| Lines: | 42 |
| Message-ID: | <930622805.86738@kyle.inet.net.nz> |
| NNTP-Posting-Host: | kyle.inet.net.nz |
| X-Trace: | titan.xtra.co.nz 930622067 4479082 202.50.171.4 (29 Jun 1999 02:07:47 GMT) |
| X-Complaints-To: | abuse AT xtra DOT co DOT nz |
| NNTP-Posting-Date: | 29 Jun 1999 02:07:47 GMT |
| X-Newsreader: | Microsoft Outlook Express 4.72.3110.5 |
| X-MimeOLE: | Produced By Microsoft MimeOLE V4.72.3110.3 |
| Cache-Post-Path: | kyle.inet.net.nz!unknown AT p38-tnt1 DOT inet DOT net DOT nz |
| X-Cache: | nntpcache 2.3.3 (see http://www.nntpcache.org/) |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
Umm, I have written the following for NASM:
[SECTION .text]
GLOBAL _setmode ; setmode(int mode)
_setmode:
push bp
mov bp, sp
push ax
push dx
mov ax, [bp+4]
int 10h
pop dx
pop ax
pop bp
ret
and compiled it as a COFF, then I compiled it with this file :
extern void setmode(int mode);
void main(void) {
setmode(0x13);
}
using the line (DJGPP):
>>gcc main.c graphics.o
creating a file a.exe
when I run a.exe, nothing happens. But it should change to screen 13h.
What is happening, can somebody please help!
David
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |