Sort boot files (#260)

This commit is contained in:
Tharo
2021-08-11 03:15:31 +01:00
committed by GitHub
parent 9333306738
commit 82cc274b6a
85 changed files with 213 additions and 176 deletions
+23
View File
@@ -0,0 +1,23 @@
#include "global.h"
void* __osMemcpy(void* dst, void* src, size_t size) {
u8* _dst = dst;
u8* _src = src;
register s32 rem;
if (_dst == _src) {
return dst;
}
if (_dst < _src) {
for (rem = size--; rem != 0; rem = size--) {
*_dst++ = *_src++;
}
} else {
_dst += size - 1;
_src += size - 1;
for (rem = size--; rem != 0; rem = size--) {
*_dst-- = *_src--;
}
}
return dst;
}
+11
View File
@@ -0,0 +1,11 @@
#include "global.h"
void* __osMemset(void* ptr, s32 val, u32 size) {
u8* dst = ptr;
register s32 rem;
for (rem = size--; rem != 0; rem = size--) {
*dst++ = val;
}
return ptr;
}
+16
View File
@@ -0,0 +1,16 @@
#include "global.h"
s32 __osStrcmp(const char* str1, const char* str2) {
char c1;
char c2;
do {
c1 = *str1++;
c2 = *str2++;
if (c1 != c2) {
return c1 - c2;
}
} while (c1);
return 0;
}
+12
View File
@@ -0,0 +1,12 @@
#include "global.h"
char* __osStrcpy(char* dst, const char* src) {
char* _dst = dst;
while (*src != '\0') {
*_dst++ = *src++;
}
*_dst = '\0';
return dst;
}
+27
View File
@@ -0,0 +1,27 @@
#include "global.h"
#pragma GLOBAL_ASM("asm/non_matchings/boot/boot_80086760/func_80086760.s")
#pragma GLOBAL_ASM("asm/non_matchings/boot/boot_80086760/func_80086794.s")
#pragma GLOBAL_ASM("asm/non_matchings/boot/boot_80086760/func_800867B4.s")
#pragma GLOBAL_ASM("asm/non_matchings/boot/boot_80086760/func_800867D4.s")
#pragma GLOBAL_ASM("asm/non_matchings/boot/boot_80086760/func_800867F4.s")
#pragma GLOBAL_ASM("asm/non_matchings/boot/boot_80086760/func_80086814.s")
#pragma GLOBAL_ASM("asm/non_matchings/boot/boot_80086760/func_80086834.s")
#pragma GLOBAL_ASM("asm/non_matchings/boot/boot_80086760/func_80086880.s")
#pragma GLOBAL_ASM("asm/non_matchings/boot/boot_80086760/func_800869A4.s")
#pragma GLOBAL_ASM("asm/non_matchings/boot/boot_80086760/func_80086AF0.s")
#pragma GLOBAL_ASM("asm/non_matchings/boot/boot_80086760/func_80086B30.s")
#pragma GLOBAL_ASM("asm/non_matchings/boot/boot_80086760/func_80086C18.s")
#pragma GLOBAL_ASM("asm/non_matchings/boot/boot_80086760/func_80086C48.s")
+12
View File
@@ -0,0 +1,12 @@
#include "global.h"
f32 fmodf(f32 dividend, f32 divisor) {
s32 quotient;
if (divisor == 0.0f) {
return 0.0f;
}
quotient = dividend / divisor;
return dividend - quotient * divisor;
}
+7
View File
@@ -0,0 +1,7 @@
#include "global.h"
#pragma GLOBAL_ASM("asm/non_matchings/boot/loadfragment/Load_Relocate.s")
#pragma GLOBAL_ASM("asm/non_matchings/boot/loadfragment/Load_LoadOverlay.s")
#pragma GLOBAL_ASM("asm/non_matchings/boot/loadfragment/Load_AllocateAndLoad.s")
+5
View File
@@ -0,0 +1,5 @@
#include "global.h"
#pragma GLOBAL_ASM("asm/non_matchings/boot/printutils/PrintUtils_VPrintf.s")
#pragma GLOBAL_ASM("asm/non_matchings/boot/printutils/PrintUtils_Printf.s")
+11
View File
@@ -0,0 +1,11 @@
#include "global.h"
#pragma GLOBAL_ASM("asm/non_matchings/boot/sleep/Sleep_Cycles.s")
#pragma GLOBAL_ASM("asm/non_matchings/boot/sleep/Sleep_Nsec.s")
#pragma GLOBAL_ASM("asm/non_matchings/boot/sleep/Sleep_Usec.s")
#pragma GLOBAL_ASM("asm/non_matchings/boot/sleep/Sleep_Msec.s")
#pragma GLOBAL_ASM("asm/non_matchings/boot/sleep/Sleep_Sec.s")
+21
View File
@@ -0,0 +1,21 @@
#include "global.h"
#pragma GLOBAL_ASM("asm/non_matchings/boot/system_malloc/StartHeap_Alloc.s")
#pragma GLOBAL_ASM("asm/non_matchings/boot/system_malloc/StartHeap_AllocR.s")
#pragma GLOBAL_ASM("asm/non_matchings/boot/system_malloc/StartHeap_Realloc.s")
#pragma GLOBAL_ASM("asm/non_matchings/boot/system_malloc/StartHeap_Free.s")
#pragma GLOBAL_ASM("asm/non_matchings/boot/system_malloc/StartHeap_Calloc.s")
#pragma GLOBAL_ASM("asm/non_matchings/boot/system_malloc/StartHeap_AnalyzeArena.s")
#pragma GLOBAL_ASM("asm/non_matchings/boot/system_malloc/StartHeap_CheckArena.s")
#pragma GLOBAL_ASM("asm/non_matchings/boot/system_malloc/StartHeap_InitArena.s")
#pragma GLOBAL_ASM("asm/non_matchings/boot/system_malloc/StartHeap_Cleanup.s")
#pragma GLOBAL_ASM("asm/non_matchings/boot/system_malloc/StartHeap_IsInitialized.s")