Support i386

This commit is contained in:
Alex
2023-03-29 03:02:49 +03:00
parent 38dae2c9f7
commit 9e21c5326b
28 changed files with 31 additions and 31 deletions

View File

@ -0,0 +1,15 @@
// #include <types.h>
// #include <debug.h>
// int Entry(void *Info);
// void _start(void *Raw)
// {
// error("Todo");
// while (1)
// asmv("hlt");
// Entry(NULL);
// return;
// }
// C stuff

View File

@ -0,0 +1,15 @@
#include <types.h>
#include <debug.h>
int Entry(void *Info);
void _start(void *Raw)
{
UNUSED(Raw);
error("ERROR! INVALID BOOT PROTOCOL!");
while (1)
asmv("hlt");
Entry(NULL);
return;
}

View File

@ -0,0 +1 @@
// C++ constructor/destructor stuff

View File

@ -0,0 +1 @@
// C++ constructor/destructor stuff

View File

@ -0,0 +1,13 @@
.section .init
.global _init
.type _init, @function
_init:
push %ebp
mov %esp, %ebp
.section .fini
.global _fini
.type _fini, @function
_fini:
push %ebp
mov %esp, %ebp

View File

@ -0,0 +1,7 @@
.section .init
pop %ebp
ret
.section .fini
pop %ebp
ret