git-svn-id: https://spexeah.com:8443/svn/Asuro@650 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
@ -48,6 +48,8 @@ procedure sleep(seconds : uint32);
|
||||
|
||||
function BCDToUint8(bcd : uint8) : uint8;
|
||||
|
||||
procedure resetSystem();
|
||||
|
||||
var
|
||||
endptr : uint32; external name '__end';
|
||||
stack : uint32; external name 'KERNEL_STACK';
|
||||
@ -325,6 +327,18 @@ begin
|
||||
BCDToUint8:= ((bcd SHR 4) * 10) + (bcd AND $0F);
|
||||
end;
|
||||
|
||||
procedure resetSystem();
|
||||
var
|
||||
good : uint8;
|
||||
|
||||
begin
|
||||
CLI;
|
||||
good:= $02;
|
||||
while (good AND $02) > 0 do good:= inb($64);
|
||||
outb($64, $FE);
|
||||
halt_and_catch_fire;
|
||||
end;
|
||||
|
||||
procedure BSOD(fault : pchar; info : pchar);
|
||||
var
|
||||
trace : pchar;
|
||||
|
@ -394,6 +394,11 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure Reboot(Params : PParamList);
|
||||
begin
|
||||
resetSystem;
|
||||
end;
|
||||
|
||||
procedure init;
|
||||
begin
|
||||
console.writestringln('TERMINAL: INIT BEGIN.');
|
||||
@ -409,6 +414,7 @@ begin
|
||||
registerCommand('PATTERN', @cockwomble, 'Print an animated pattern to the screen.');
|
||||
registerCommand('TIME', @printTime, 'Print the current time.');
|
||||
registerCommand('SERIAL', @SendSerial, 'Send ''helloworld'' through COM1.');
|
||||
registerCommand('REBOOT', @Reboot, 'Reboot the system.');
|
||||
console.writestringln('TERMINAL: INIT END.');
|
||||
end;
|
||||
|
||||
|
Reference in New Issue
Block a user