어셈블리

hello world

파아랑새 2017. 7. 20. 20:04

section .text ; // .code 

global _start

_start:

mov edx, len

mov ecx, msg 

mov ebx, 1 ;file descriptor

mov eax, 4 ;system call number (sys_write)

int 0x80 ;call kernel


mov eax, 1

int 0x80 

section .data

msg db "Hello, world!", 0xa

len equ $ - msg  ;length of the string