git-svn-id: https://spexeah.com:8443/svn/Asuro@654 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c

This commit is contained in:
kieron
2018-05-03 23:16:37 +00:00
parent a5bae52f09
commit 6ae51ac70d
67 changed files with 341 additions and 17 deletions

View File

@ -3,11 +3,11 @@ unit asuro;
interface
const
VERSION = '1.0.0-651a';
VERSION = '1.0.0-653a';
VERSION_MAJOR = '1';
VERSION_MINOR = '0';
VERSION_SUB = '0';
REVISION = '651';
REVISION = '653';
RELEASE = 'a';
implementation

View File

@ -49,9 +49,18 @@ type
end;
PMCFG = ^TMCFG;
TCounters = record
c16 : uint16;
c32 : uint32;
c64 : uint64;
end;
const
BDA : PBDA = PBDA($C0000400);
var
Counters : TCounters;
procedure tick_update(data : void);
implementation
@ -61,7 +70,11 @@ uses
procedure tick_update(data : void);
begin
BDA^.Ticks:= BDA^.Ticks + 1;
//BDA^.Ticks:= BDA^.Ticks + 1;
inc(BDA^.Ticks);
inc(Counters.c16);
inc(Counters.c32);
inc(Counters.c64);
end;
end.

View File

@ -46,6 +46,10 @@ procedure BSOD(fault : pchar; info : pchar);
procedure psleep(t : uint16);
procedure sleep(seconds : uint32);
function get16bitcounter : uint16;
function get32bitcounter : uint32;
function get64bitcounter : uint64;
function BCDToUint8(bcd : uint8) : uint8;
procedure resetSystem();
@ -339,6 +343,21 @@ begin
halt_and_catch_fire;
end;
function get16bitcounter : uint16;
begin
get16bitcounter:= bios_data_area.Counters.c16;
end;
function get32bitcounter : uint32;
begin
get32bitcounter:= bios_data_area.Counters.c32;
end;
function get64bitcounter : uint64;
begin
get64bitcounter:= bios_data_area.Counters.c64;
end;
procedure BSOD(fault : pchar; info : pchar);
var
trace : pchar;