Some things (still doesn't compile)

This commit is contained in:
Vincenzo Aleksey Brocato 2024-09-06 00:40:37 +02:00 committed by VinceAle7082
parent ca53f59ddf
commit ede60df3c2
4 changed files with 9 additions and 4 deletions

2
.gitignore vendored
View File

@ -1,3 +1,3 @@
build/ build/
.mailmap *.err
.vscode .vscode

View File

@ -232,8 +232,8 @@ int *printf_number(int *argp, int length, bool sign, int radix)
// convert number to ASCII // convert number to ASCII
do do
{ {
uint32_t rem; uint32_t rem = number % radix;
x86_div64_32(number, radix, &number, &rem); number = number / radix;
buffer[pos++] = g_HexChars[rem]; buffer[pos++] = g_HexChars[rem];
} while (number > 0); } while (number > 0);

View File

@ -21,3 +21,7 @@ _x86_Video_WriteCharTeletype:
pop bp pop bp
ret ret
global _x86_div64_32
_x86_div64_32:

View File

@ -2,3 +2,4 @@
#include "stdint.h" #include "stdint.h"
void _cdecl x86_Video_WriteCharTeletype(char c, uint8_t page); void _cdecl x86_Video_WriteCharTeletype(char c, uint8_t page);
void _cdecl x86_div64_32(uint64_t dividend, uint32_t divisor, uint64_t *quotientOut, uint64_t *remainderOut);