Not sure why this was necessary...
This commit is contained in:
16
crt0.c
16
crt0.c
@@ -4,10 +4,18 @@
|
|||||||
int main();
|
int main();
|
||||||
|
|
||||||
asm (
|
asm (
|
||||||
".section .init \n"
|
".section .init \n"
|
||||||
".global _start \n"
|
".global _start \n"
|
||||||
"_start: \n"
|
"_start: \n\t"
|
||||||
" jmp main \n"
|
"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) {
|
void* memset(void* ptr, int val, size_t len) {
|
||||||
|
Reference in New Issue
Block a user