delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/03/23:00:30

From: "Sylvester Hesp" <hes3 AT gironet DOT nl>
Newsgroups: comp.os.msdos.djgpp
Subject: DJGPP and ASM
Date: Mon, 3 Aug 1998 19:47:10 +0200
Organization: MultiAccess
Message-ID: <902166619.579892@samba.news.big-orange.net>
References: <902165686 DOT 206012 AT samba DOT news DOT big-orange DOT net>
NNTP-Posting-Host: samba-eth1.news.big-orange.net
NNTP-Posting-Date: 3 Aug 1998 18:48:40 GMT
Cache-Post-Path: samba.news.big-orange.net!unknown AT 89 DOT 148 DOT dialin DOT mxs DOT nl
Lines: 54
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I FORGOT TO WRITE SOMETHING
SCROLL DOWN PLZ...


>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


    SEGMENT _DATA USE32
    Message    db "Hi there!!!", 13, 10, 0
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ I forgot to write this...


>    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 -


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