clang-format -i *.cc *.c *.h
This commit is contained in:
28
crt0.c
28
crt0.c
@@ -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;
|
||||
|
Reference in New Issue
Block a user