This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Assembler


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]