Vesa32 additions + util functions to support

This commit is contained in:
t3hn3rd committed 2022-02-07 19:48:00 +00:00
1 parent 69d1d22a18
commit 19b433a19f
5 files changed
+200 -28

No files matched your search

+11
View File
@@ -80,6 +80,8 @@ function RorDWord(AValue : uint32; Dist : uint8) : uint32;
function MsSinceSystemBoot : uint64;
function abs(x : sint32) : uint32;
var
endptr : uint32; external name '__end';
stack : uint32; external name 'KERNEL_STACK';
@@ -89,6 +91,15 @@ implementation
uses
console, RTC, cpu, serial, strings, isr_types;
function abs(x : sint32) : uint32;
var
y : uint32;
begin
y:= x SHR 31;
abs:= (x XOR y) - y;
end;
function MsSinceSystemBoot : uint64;
begin
MsSinceSystemBoot:= div6432(getTSC, (CPUID.ClockSpeed.Hz div 1000));