|
be81866768
|
__INTERNAL_fmt: fix stack offset when output=memory instead of fd
|
2025-07-31 14:34:46 +02:00 |
|
|
00568e2e7c
|
Adds format(), modified __INTERNAL_fmt to allow writing to memory (instead of writing to given FD)
|
2025-07-31 14:18:00 +02:00 |
|
|
7c89bfe7d3
|
console.asm: printf** variables renamed to __fmt_** args since printf->__INTERNAL_fmt
|
2025-07-31 13:04:09 +02:00 |
|
|
93c606541d
|
Remove old return value comment of reads()
|
2025-07-31 11:47:46 +02:00 |
|
|
6f2e427d86
|
Adds reads()
|
2025-07-31 11:34:50 +02:00 |
|
|
ca6d6e6d31
|
Fix strcat SIGSEGV crash
|
2025-07-27 21:11:53 +02:00 |
|
|
dbf2af0253
|
Adds fgetat,fgettype,fgetmod. Seperates constants to multiple files
|
2025-07-27 14:11:44 +02:00 |
|
|
5b6831a501
|
__INTERNAL_fmt: Exit if syscall NR_write fails (which is very likely if called through fwrite with an invalid FD)
|
2025-07-26 01:10:34 +02:00 |
|
|
e8b47fff6d
|
__INTERNAL_fmt: Assure correct stack arguments are loaded if FD=stderr
|
2025-07-26 01:07:42 +02:00 |
|
|
69d7a52c62
|
Adds eprintf (printf but print to stderr)
|
2025-07-26 00:57:30 +02:00 |
|
|
8a18695328
|
__INTERNAL_fmt: Add description + return with errno -EBADF if FD is lower than FD_stdout (1)
|
2025-07-26 00:50:09 +02:00 |
|
|
6b45b84ab1
|
printf->__INTERNAL_fmt. FD passed via RAX. fwrite now allows specifiers and variable arguments.
|
2025-07-26 00:20:25 +02:00 |
|
|
6cfb1b6f5f
|
printf fix: Decrease rdi if padding is not 0 and specifier is invalid (assure '%' is printed)
|
2025-07-24 22:20:47 +02:00 |
|
|
7c46988508
|
FIX printf: '%0(invalid)' as-is (don't exclude '%')
|
2025-07-24 20:32:49 +02:00 |
|
|
8f4f0a83f5
|
FIX printf: NL and TAB not being counted in amount of printed chars
|
2025-07-22 06:55:08 +02:00 |
|
|
d595ba1903
|
Little update in printf comment (padding now does take num prefix into account)
|
2025-07-20 23:39:54 +02:00 |
|
|
8c25b7913b
|
printf(): Print null pointers (arg for %s = 0) as (null), fixes #4
|
2025-07-20 22:52:17 +02:00 |
|
|
ebee21c457
|
mov X, 0 -> xor X, X - Fixes #3
|
2025-07-20 22:38:06 +02:00 |
|
|
6bc6000454
|
printf: Prevent special characters not being processed if it was proceeded by a percentage sign (ie '%\n')
|
2025-07-20 12:35:13 +02:00 |
|
|
09cf143b2a
|
Fix printf comment: %8x->%#8x
|
2025-07-16 13:25:59 +02:00 |
|
|
bb53e7967d
|
Account for padding length when inserting prefix while padding with spaces
|
2025-07-16 13:24:24 +02:00 |
|
|
0a737dc0e5
|
Use r13 only instead of r13+r15 (bitmasking)
|
2025-07-15 21:34:36 +02:00 |
|
|
e718e1534b
|
printf: Add format specifier %p
|
2025-07-15 16:39:19 +02:00 |
|
|
70ab8b19c3
|
Allow printing prefixes for %x,%X,%b and %o (pass ~base to udec)
|
2025-07-15 16:31:52 +02:00 |
|
|
87fd5d815a
|
Update supported padding specifiers comment (include o[ctal])
|
2025-07-15 10:52:09 +02:00 |
|
|
a4855c3b75
|
printf: Macro process_arg to decrease repeated code
|
2025-07-15 10:45:01 +02:00 |
|
|
920522e167
|
printf: increase arg counter (r14) for invalid specifiers, as it's supposed to do (according to func doc)
|
2025-07-15 08:55:37 +02:00 |
|
|
e593ce76d3
|
Update supported specifiers in printf comment
|
2025-07-15 08:19:27 +02:00 |
|
|
dc49e29019
|
utoa/printf: Support octal (%o)
|
2025-07-15 08:18:57 +02:00 |
|
|
9f33e36883
|
Rewrite X2str functions to itoa/utoa ; it was a stupid idea to have seperate functions (=> more maintenance)
|
2025-07-15 07:58:18 +02:00 |
|
|
cae828bc9a
|
printf: Add support for \n and \t
|
2025-07-14 13:48:40 +02:00 |
|
|
483d9185de
|
Fix printf args always being first arg when using padding, improved/added tests. NEW FOUND BUG: full qword byte misses 3 characters when using padding
|
2025-07-13 15:03:59 +02:00 |
|
|
efeded5547
|
printf: Add padding support for %d, %i, %u, %x, %X
|
2025-07-12 16:33:07 +02:00 |
|
|
b327248e0c
|
printf: Shorten code; MOV RDX, R13 instead of bunch of checks (originally I intended to use NOT R12 if padding with zeroes)
|
2025-07-12 08:10:43 +02:00 |
|
|
ee17ec68e0
|
printf(): Allow padding (spaces or zeroes) for %b
|
2025-07-12 07:48:21 +02:00 |
|
|
73e3918d39
|
printf(): Start adding padding support (right now just detect it and calculate padding length)
|
2025-07-11 00:04:30 +02:00 |
|
|
13d14f7a1f
|
(Finally) use macros in printf() to shorten code / less repeated code
|
2025-07-10 12:47:01 +02:00 |
|
|
902d962068
|
Adds bin2str() and printf() format specifier %b
|
2025-07-10 12:19:54 +02:00 |
|
|
3951e50ab0
|
Force self to sub/add rsp before/after push/pop (instead of after/before push/pop) -- prevents popping wrong values, eventually (in callee, like what printf does)
|
2025-07-10 01:38:25 +02:00 |
|
|
e592ad5c96
|
FIX: Stack alignment in printf()
|
2025-07-09 11:56:01 +02:00 |
|
|
e80b14c051
|
printf: Support %i,%x,%X
|
2025-07-09 11:34:19 +02:00 |
|
|
f8df1242fc
|
Rename int2str/uint2str -> dec2str/udec2str
|
2025-07-08 17:49:38 +02:00 |
|
|
ee14dbb853
|
printf() don't restore rcx and r8 for (u)int2str()
|
2025-07-08 17:40:02 +02:00 |
|
|
cd565f3bfa
|
printf: Adds specifiers %d and %u
|
2025-07-08 17:37:18 +02:00 |
|
|
4e7f086bff
|
printf(): Add %c, add test for %c and args on stack
|
2025-07-08 13:03:17 +02:00 |
|
|
3d2bf1b40d
|
printf(): Fix wrong instruction when fetching arg from stack (lea->mov : arg already is (supposed to be) an address)
|
2025-07-06 21:26:26 +02:00 |
|
|
3ccad56d76
|
printf(): Add support for %s, fix buffer flushing (length given was r11, not r10)
|
2025-07-06 20:50:07 +02:00 |
|
|
cc214ed5e5
|
Adds basic printf() (currently only support '%%')
|
2025-07-06 20:09:21 +02:00 |
|
|
2e9d88ed76
|
Adds print(), puts()
|
2025-07-05 02:28:59 +02:00 |
|
|
e12b8f0365
|
Add Makefile, gitignore and (empty-ish) source files
|
2025-07-05 01:11:30 +02:00 |
|