Strange error occurs in my kernel and I don't know how to fix it.
Posted: Sat Aug 03, 2024 1:58 am
I was trying to build my test OS kernel booted by UEFI and trying to make the whole screen become white color.
However,I was failed and can't resolve this error to now.I was confused and don't know how to do.
This is my test kernel's code(in pascal):
and graphics unit is too large to put forward in this forum,so I put forward in github website.
System.pas is also too large in this topic and put forward in github too.
You can read my problematic code in the hyperlink(the project itself is problematic so you do not imitate it) below:
My problematic kernel is on https://github.com/TYDQSoft/UEFIPascalOS
However,I was failed and can't resolve this error to now.I was confused and don't know how to do.
This is my test kernel's code(in pascal):
Code: Select all
program kernelmain;
uses bootconfig,graphics;
function kernel_main(param:sys_parameter):Pointer;[public,alias:'_start'];
var Pparam1:Pscreen_config;
screenconfig:screen_config;
ptr:Pgraphics_item;
res:Pqword;
begin
Pparam1:=Pointer(param.param_content);
screenconfig:=Pparam1^;
graphics_heap_initialize;
ptr:=graphics_heap_getmem(1,1,screenconfig.screen_scanline,screenconfig.screen_height);
graphics_draw_block(ptr,1,1,screenconfig.screen_scanline,screenconfig.screen_height,$FF,$FF,$FF,$FF);
graphics_heap_output_to_screen(screenconfig.screen_address,screenconfig.screen_scanline,screenconfig.screen_height);
res:=allocmem(sizeof(qword));
res^:=120;
kernel_main:=res;
end;
begin
end.
System.pas is also too large in this topic and put forward in github too.
You can read my problematic code in the hyperlink(the project itself is problematic so you do not imitate it) below:
My problematic kernel is on https://github.com/TYDQSoft/UEFIPascalOS