Adds eprintf (printf but print to stderr)
This commit is contained in:
@@ -16,6 +16,7 @@ section .text
|
||||
global print
|
||||
global puts
|
||||
global printf
|
||||
global eprintf
|
||||
|
||||
;----- print(*str[]) -----;
|
||||
; Prints given string to the console to stdout
|
||||
@@ -101,6 +102,12 @@ printf:
|
||||
mov rax, FD_stdout
|
||||
jmp __INTERNAL_fmt
|
||||
|
||||
;----- eprintf(*format[], ...) -----;
|
||||
; Same as printf, except prints to stderr
|
||||
eprintf:
|
||||
mov rax, FD_stderr
|
||||
jmp __INTERNAL_fmt
|
||||
|
||||
;----- __INTERNAL_fmt(*format[], ...) -----;
|
||||
; See printf description above, +
|
||||
; 1) Return value can be amount of printed characters or -errno (eg if bad FD was passed, -EBADF is returned)
|
||||
|
Reference in New Issue
Block a user