Load raw C binary + docs
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
bits 64
|
||||
global _start
|
||||
extern main
|
||||
|
||||
section .text
|
||||
|
||||
; Begin the program with main() function
|
||||
_start:
|
||||
call main
|
||||
|
||||
; Exit the program by exit() syscall
|
||||
.exit:
|
||||
mov rdi, rax ; put the value of "return X;" (rax) as arg1 (error_code)
|
||||
mov rax, 60 ; sys_exit
|
||||
int 0x80
|
||||
|
||||
.loop:
|
||||
jmp .loop
|
||||
Reference in New Issue
Block a user