0 Replies - 1903 Views - Last Post: 01 July 2010 - 05:44 AM

#1 Crunch   User is offline

  • D.I.C Lover
  • member icon

Reputation: 139
  • View blog
  • Posts: 1,222
  • Joined: 28-July 09

Hello World in GNU Assembly

Posted 01 July 2010 - 05:44 AM

Description: gcc filename.s
.data
hello:
.string "hello worldn"
	.text
.globl main
	.type	main, @function
main:	
	 
        movl $4 , %eax
        movl $1 , %ebx
        movl $hello , %ecx
        movl $12 , %edx
        int $0x80

        movl $1 , %eax
        xorl %ebx , %ebx
        int $0x80         
      
	ret

Is This A Good Question/Topic? 0
  • +

Page 1 of 1