NASM - The Netwide Assembler

NASM Forum => Using NASM => Topic started by: nobody on June 03, 2005, 12:04:53 PM

Title: gcc problem
Post by: nobody on June 03, 2005, 12:04:53 PM
How can I use gcc command?
Title: Re: gcc problem
Post by: Frank Kotler on June 03, 2005, 01:28:17 PM
Depends what you want to use it for, I suppose. Maybe like this?

Best,
Frank


; nasm -f elf hwc.asm
; gcc hwc.o -o hwc
; ./hwc

global main
extern printf

section .data
    fmtstr db 'Hello, World!',10,0
section .text
    main:

pushad

push dword fmtstr
    call printf
    add esp,4

popad

ret
Title: Re: gcc problem
Post by: nasm64developer on June 03, 2005, 04:32:15 PM
RTFgccM.