Commit Graph

  • 954bc21eee Change mas[Dec|Hex|Bin]str msgs Kwarde 2025-07-14 15:08:54 +02:00
  • d4dd5b7d80 printf test 12: Use tabs+%0REG_SIZEb instead of %64b for each register; assure full register length is printed if RAX has a different value Kwarde 2025-07-14 14:22:10 +02:00
  • 38126fed44 Correct printf12 Kwarde 2025-07-14 13:50:35 +02:00
  • cae828bc9a printf: Add support for \n and \t Kwarde 2025-07-14 13:48:40 +02:00
  • c544ef8c58 Add lazy clamp/clampu tests, adds [MIN|MAX]_(U)INT[64|32|16|8] constants Kwarde 2025-07-14 13:32:37 +02:00
  • e806e50dc2 X2str(): Fix bug where padding wasn't added for longer (converted) strings Kwarde 2025-07-14 12:05:00 +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 Kwarde 2025-07-13 15:03:59 +02:00
  • 1971c5b897 Fix typo (extra -) in printf10Str and printf11Str Kwarde 2025-07-12 16:36:51 +02:00
  • efeded5547 printf: Add padding support for %d, %i, %u, %x, %X Kwarde 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) Kwarde 2025-07-12 08:10:43 +02:00
  • ee17ec68e0 printf(): Allow padding (spaces or zeroes) for %b Kwarde 2025-07-12 07:48:21 +02:00
  • 971b1cbb86 Adds clamp[u]() Kwarde 2025-07-12 06:50:55 +02:00
  • 73e3918d39 printf(): Start adding padding support (right now just detect it and calculate padding length) Kwarde 2025-07-11 00:04:30 +02:00
  • 13d14f7a1f (Finally) use macros in printf() to shorten code / less repeated code Kwarde 2025-07-10 12:47:01 +02:00
  • 902d962068 Adds bin2str() and printf() format specifier %b Kwarde 2025-07-10 12:19:54 +02:00
  • e0bd8bcdbd Adds min(), minu(), max(), maxu() Kwarde 2025-07-10 11:58:29 +02:00
  • 34d7fee8dc Adds tolower(), toupper() Kwarde 2025-07-10 11:42:35 +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) Kwarde 2025-07-10 01:38:25 +02:00
  • 2d1a4b9d56 convert.asm: Avoid stack usage for reversing string - use second buffer instead Kwarde 2025-07-10 01:37:26 +02:00
  • d919a0be05 FIX: Stack alignment in tests.asm Kwarde 2025-07-10 01:22:44 +02:00
  • 2b3439c380 convert.asm: MOV -> LEA Kwarde 2025-07-10 00:56:56 +02:00
  • 467b5b7a0b hex2str: Perform test r9,r9 only once (instead of for each number in loop .convert) Kwarde 2025-07-10 00:22:36 +02:00
  • 7d559d61da Fix strcmp() behaviour (ret=-1 --> ret=0) Kwarde 2025-07-10 00:01:26 +02:00
  • 08389a5bb2 Adds strcmp() (note: much different than strcmp in C) Kwarde 2025-07-09 23:44:40 +02:00
  • 791cccc262 Improved strlen test (output), test islower/isupper Kwarde 2025-07-09 22:58:51 +02:00
  • 2a4f3b2558 Adds islower()/isupper() Kwarde 2025-07-09 22:57:33 +02:00
  • 368457f5c3 Remove leftover code in udec2str/hex2str Kwarde 2025-07-09 12:17:00 +02:00
  • e592ad5c96 FIX: Stack alignment in printf() Kwarde 2025-07-09 11:56:01 +02:00
  • 3eb71845a7 hex2str: cmp -> test Kwarde 2025-07-09 11:44:22 +02:00
  • 12827bb1a1 Add %i in printf test Kwarde 2025-07-09 11:41:21 +02:00
  • 881d88ec4e hex2str: Fix logic for arg uppercase (0=tolower, anything else=upper) Kwarde 2025-07-09 11:35:03 +02:00
  • e80b14c051 printf: Support %i,%x,%X Kwarde 2025-07-09 11:34:19 +02:00
  • af34e3208c Adds hex2str Kwarde 2025-07-09 11:16:04 +02:00
  • f8df1242fc Rename int2str/uint2str -> dec2str/udec2str Kwarde 2025-07-08 17:49:38 +02:00
  • ee14dbb853 printf() don't restore rcx and r8 for (u)int2str() Kwarde 2025-07-08 17:40:02 +02:00
  • cd565f3bfa printf: Adds specifiers %d and %u Kwarde 2025-07-08 17:37:18 +02:00
  • 72409116f5 Adds int2str() and uint2str() (=>itoa) Kwarde 2025-07-08 17:12:33 +02:00
  • 4e7f086bff printf(): Add %c, add test for %c and args on stack Kwarde 2025-07-08 13:03:17 +02:00
  • 3b1ce7ca40 Adds strclr() Kwarde 2025-07-07 15:21:48 +02:00
  • 9b1519b2f4 strcpy(): Assure DF=0 Kwarde 2025-07-06 21:35:50 +02:00
  • 3d2bf1b40d printf(): Fix wrong instruction when fetching arg from stack (lea->mov : arg already is (supposed to be) an address) Kwarde 2025-07-06 21:26:26 +02:00
  • 3ccad56d76 printf(): Add support for %s, fix buffer flushing (length given was r11, not r10) Kwarde 2025-07-06 20:50:07 +02:00
  • cc214ed5e5 Adds basic printf() (currently only support '%%') Kwarde 2025-07-06 20:09:21 +02:00
  • a47ab3cdc6 strcat: Better logic for determining max amount of characters to copy Kwarde 2025-07-06 19:13:05 +02:00
  • ddd44d5a68 Remove comment that was supposed to be removed in the previous commit Kwarde 2025-07-06 12:25:19 +02:00
  • 69fd2096fa Remove old comments Kwarde 2025-07-06 12:24:46 +02:00
  • a2daf9602b Adds strcat() Kwarde 2025-07-06 12:20:34 +02:00
  • 1a6ea4ffe6 Optimize strcpy(): 1- Conditional moves (I keep forgetting about them) 2- Better setting of RCX (better accounting for EOS) Kwarde 2025-07-06 11:59:49 +02:00
  • 2fb4312615 Adds strcpy() Kwarde 2025-07-06 11:15:58 +02:00
  • a3a128354d zero AL, not RAX in strlen() (SCASB uses AL, so no need to zero all bits) Kwarde 2025-07-06 10:53:23 +02:00
  • a193054304 Add conditional code for tests.asm (include certain tests or not) Kwarde 2025-07-05 02:30:18 +02:00
  • 2e9d88ed76 Adds print(), puts() Kwarde 2025-07-05 02:28:59 +02:00
  • b0a3da746f Adds strlen() Kwarde 2025-07-05 01:45:58 +02:00
  • 3b275a6166 Add small constants set, exit() and tests entry/exit Kwarde 2025-07-05 01:33:33 +02:00
  • e12b8f0365 Add Makefile, gitignore and (empty-ish) source files Kwarde 2025-07-05 01:11:30 +02:00
  • 07b6ed5a34 Init repo Kwarde 2025-07-05 00:49:46 +02:00