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



'어셈블리' 카테고리의 다른 글

대소관계  (0) 2017.09.23
어셈블리 계산기(더하기, 빼기, 나누기, 곱하기)  (0) 2017.07.30
인라인 어셈블리 계산기(사칙연산 완성)  (0) 2017.07.04
nasm  (0) 2017.07.01
어셈블리어_TEST  (0) 2017.06.23