memory map

This commit is contained in:
aramya 2021-09-29 16:43:27 +01:00
parent 72723909f0
commit 27391d10dc
2 changed files with 24 additions and 5 deletions

27
boot.c
View File

@ -1,11 +1,28 @@
#define DEVICE16 0x81080000
#define DEVICE16END 0x810FFFFF
#define VRAM 0x80000000
#define VRAMEND 0x80FFFFFF
#define BIOS 0xFFC00000
#define BIOSEND 0xFFFFFFFF
void begin(void)
{
unsigned char* addr = 0x7FFFFFFF;
unsigned char* noise = 0xFFEE0000;
while (addr < 0x80500000){
*addr = *noise;
unsigned char* addr = VRAM;
unsigned char* noise = BIOS+0x2E0000;
while (addr < VRAMEND)
{
*addr = *noise;
addr++;
noise++;
}
for(;;);
begin();
}
void clearscreen(void)
{
unsigned char* addr = 0x80000000;
while (addr < 0x80FFFFFF)
{
*addr = 0;
addr++;
}
}

View File

@ -1,6 +1,8 @@
." Booting through OpenFirmware..." cr
frame-buffer-adr
.
: rep dup 0 do i . loop ;
500 rep
boot hd:,\boot\kernel.elf