Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3310134
  • 博文数量: 754
  • 博客积分: 10132
  • 博客等级: 上将
  • 技术积分: 7780
  • 用 户 组: 普通用户
  • 注册时间: 2008-01-14 23:36
文章分类

全部博文(754)

文章存档

2012年(3)

2011年(39)

2010年(66)

2009年(167)

2008年(479)

我的朋友

分类: LINUX

2008-08-25 17:28:10

#hello.s

.data

        msg : .string "Hello, World!\n"

        len = . - msg

.text

.global _start

_start

         movl $len, %edx

         movl $msg, %ecx

         movl $1, %ebx

         movl $4, %eax

         int $0x80

        

         movl $0, %ebx

         movl $1, %eax

          int     $0x80

#end

编译:

as -o hello.o hello.s

连接:

ld -s -o hello hello.o

运行:

./hello

阅读(1072) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~