24 lines
387 B
NASM
24 lines
387 B
NASM
section .text
|
|
global _start
|
|
_start:
|
|
mov rax, 1
|
|
int 42h
|
|
mov rdi, HelloLabel
|
|
mov rsi, 22
|
|
mov rax, 3
|
|
int 42h
|
|
mov rdi, 400
|
|
mov rax, 2
|
|
int 42h
|
|
mov rdi, ExitLabel
|
|
mov rsi, 31
|
|
mov rax, 3
|
|
int 42h
|
|
mov rax, 0
|
|
int 42h
|
|
|
|
section .rodata
|
|
HelloLabel:
|
|
db "Hello from /bin/init!", 0xA
|
|
ExitLabel:
|
|
db "Well, bye. (/bin/init exiting)", 0xA |