Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
To: cygwin@cygwin.com
From: "Krzysztof Duleba" <krzysan@skrzynka.pl>
Subject: Assembler
Date: Mon, 16 Feb 2004 21:45:40 +0100
Lines: 34
Message-ID: <c0r9sc$4j3$1@sea.gmane.org>
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-2"
Content-Transfer-Encoding: 7bit
X-Complaints-To: usenet@sea.gmane.org
X-Gmane-NNTP-Posting-Host: fw-gw-atm.mimuw.edu.pl
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158

Hello

I wanted to test some of my linux assembler code on my Windows-Cygwin box.
Is it possible at all?

Here you have a hello world:

section .data
        t       db      'Hello world',0
        len     equ     13
section .text

global _start
_start: mov edx,len
        mov ecx,t
        mov ebx,1
        mov eax,4
        int 0x80
        mov ebx,0
        mov eax,1
        int 0x80

How should I compile it? Doing it the way I used to gives me an error:

bash-2.05b$ nasm -f elf hello.asm
bash-2.05b$ ld hello.o -o hello.exe
ld: warning: cannot find entry symbol _mainCRTStartup; defaulting to
00401000

An .exe file is created, but is corrupted.

Regards
Krzysztof Duleba



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

