Author Topic: gcc problem  (Read 13519 times)

nobody

  • Guest
gcc problem
« on: June 03, 2005, 12:04:53 PM »
How can I use gcc command?

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: gcc problem
« Reply #1 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

nasm64developer

  • Guest
Re: gcc problem
« Reply #2 on: June 03, 2005, 04:32:15 PM »
RTFgccM.