24 lines
437 B
NASM
24 lines
437 B
NASM
section .text
|
|
global _start
|
|
_start:
|
|
mov rax, 1
|
|
int 42h ; sys_yield
|
|
mov rdi, HelloLabel
|
|
mov rsi, 17
|
|
mov rax, 3
|
|
int 42h ; sys_write
|
|
mov rdi, 4000
|
|
mov rax, 2
|
|
int 42h ; sys_sleep
|
|
mov rdi, ExitLabel
|
|
mov rsi, 26
|
|
mov rax, 3
|
|
int 42h ; sys_write
|
|
mov rax, 0
|
|
int 42h ; sys_exit
|
|
|
|
section .rodata
|
|
HelloLabel:
|
|
db "Hello from init!", 0xA
|
|
ExitLabel:
|
|
db "Well, bye. (init exiting)", 0xA |