clang-format -i *.cc *.c *.h

This commit is contained in:
2025-09-29 18:54:48 +02:00
parent f3057e92be
commit f1b2902640
8 changed files with 194 additions and 249 deletions

28
crt0.c
View File

@@ -3,24 +3,22 @@
int main();
asm (
".section .init \n"
".global _start \n"
"_start: \n\t"
"mov %cs, %ax \n\t"
"mov %ax, %ds \n\t"
"mov %ax, %es \n\t"
"cli \n\t"
"mov %ax, %ss \n\t"
"mov $0x1000, %ax \n\t"
"mov %ax, %sp \n\t"
"sti \n\t"
"jmp main"
);
asm(".section .init \n"
".global _start \n"
"_start: \n\t"
"mov %cs, %ax \n\t"
"mov %ax, %ds \n\t"
"mov %ax, %es \n\t"
"cli \n\t"
"mov %ax, %ss \n\t"
"mov $0x1000, %ax \n\t"
"mov %ax, %sp \n\t"
"sti \n\t"
"jmp main");
void* memset(void* ptr, int val, size_t len) {
uint8_t* p = ptr;
while(len--) {
while (len--) {
*p++ = val;
}
return ptr;