Don't assume we are located at /bin/init
This commit is contained in:
parent
008bdf505c
commit
cde850258d
@ -2,23 +2,23 @@ section .text
|
||||
global _start
|
||||
_start:
|
||||
mov rax, 1
|
||||
int 42h
|
||||
int 42h ; sys_yield
|
||||
mov rdi, HelloLabel
|
||||
mov rsi, 22
|
||||
mov rsi, 17
|
||||
mov rax, 3
|
||||
int 42h
|
||||
mov rdi, 400
|
||||
int 42h ; sys_write
|
||||
mov rdi, 4000
|
||||
mov rax, 2
|
||||
int 42h
|
||||
int 42h ; sys_sleep
|
||||
mov rdi, ExitLabel
|
||||
mov rsi, 31
|
||||
mov rsi, 26
|
||||
mov rax, 3
|
||||
int 42h
|
||||
int 42h ; sys_write
|
||||
mov rax, 0
|
||||
int 42h
|
||||
int 42h ; sys_exit
|
||||
|
||||
section .rodata
|
||||
HelloLabel:
|
||||
db "Hello from /bin/init!", 0xA
|
||||
db "Hello from init!", 0xA
|
||||
ExitLabel:
|
||||
db "Well, bye. (/bin/init exiting)", 0xA
|
||||
db "Well, bye. (init exiting)", 0xA
|
Loading…
Reference in New Issue
Block a user