Get rid of gcc, adds exit()
This commit is contained in:
7
core.asm
7
core.asm
@ -1,3 +1,4 @@
|
||||
extern NR_exit
|
||||
extern strclr
|
||||
|
||||
section .text
|
||||
@ -10,6 +11,7 @@ section .text
|
||||
global tolower
|
||||
global toupper
|
||||
global itoa
|
||||
global exit
|
||||
|
||||
;----- min(int a, int b) -----;
|
||||
; return value: lowest value
|
||||
@ -176,3 +178,8 @@ itoa:
|
||||
pop rax
|
||||
leave
|
||||
ret
|
||||
;----- exit(int exit_code) -----;
|
||||
; returns: nothing
|
||||
exit:
|
||||
mov rax, NR_exit
|
||||
syscall
|
||||
|
Reference in New Issue
Block a user