Mail Archives: djgpp/1998/08/03/14:45:34
From: | "Sylvester Hesp" <hes3 AT gironet DOT nl>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | DJGPP and ASM
|
Date: | Mon, 3 Aug 1998 19:31:45 +0200
|
Organization: | MultiAccess
|
Lines: | 42
|
Message-ID: | <902165686.206012@samba.news.big-orange.net>
|
NNTP-Posting-Host: | samba-eth1.news.big-orange.net
|
NNTP-Posting-Date: | 3 Aug 1998 18:33:06 GMT
|
Cache-Post-Path: | samba.news.big-orange.net!unknown AT 89 DOT 148 DOT dialin DOT mxs DOT nl
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
I'm writing a program in DJGPP and an Assembler (NASM 0.97)
When I link the object-files from DJGPP and NASM, and I run the
program, I get the message :
"Exiting due to signal SIGSEGV"
This is my code :
in test.c:
#include <stdio.h>
extern void hi_there ();
int main ()
{
hi_there ();
return 0;
}
int testasm.asm:
SEGMENT _TEXT USE32
extern _printf
global _hi_there
_hi_there:
push ebp
push dword Message
call _printf
add esp, 4
pop ebp
ret
at the dos command-line :
nasm testasm.asm -o testasm.o -f coff
gcc test.c testasm.o -o test.exe
Who can help me?
Sylvester Hesp
hes3 AT gironet DOT nl
- Raw text -