mirror of
https://github.com/vapaamies/KolibriOS.git
synced 2025-09-21 02:30:07 +02:00
Units initialization/finalization support added
This commit is contained in:
@@ -4,7 +4,7 @@ uses
|
||||
CRT;
|
||||
|
||||
begin
|
||||
ConsoleInit('Console Colors');
|
||||
InitConsole('Console Colors');
|
||||
|
||||
TextBackground(Black);
|
||||
WriteLn('Black');
|
||||
@@ -75,6 +75,4 @@ begin
|
||||
WriteLn('White');
|
||||
|
||||
ReadKey;
|
||||
|
||||
ConsoleExit(True);
|
||||
end.
|
||||
|
@@ -9,7 +9,7 @@ var
|
||||
CursorPos: TConsolePoint;
|
||||
|
||||
begin
|
||||
ConsoleInit('Date/Time');
|
||||
InitConsole('Date/Time');
|
||||
|
||||
SetCursorHeight(0);
|
||||
SetCursorPos(27, 11);
|
||||
@@ -29,6 +29,4 @@ begin
|
||||
SetCursorPos(CursorPos);
|
||||
Sleep(50);
|
||||
until KeyPressed;
|
||||
|
||||
ConsoleExit(True);
|
||||
end.
|
||||
|
@@ -13,13 +13,11 @@ var
|
||||
Buffer: array[0..BUFFER_SIZE - 1] of Char;
|
||||
|
||||
begin
|
||||
ConsoleInit('Get Current Directory');
|
||||
InitConsole('Get Current Directory', False);
|
||||
|
||||
GetCurrentDirectory(Buffer, BUFFER_SIZE);
|
||||
|
||||
Write('AppPath is "%s"'#10, AppPath^);
|
||||
Write('CmdLine is "%s"'#10, CmdLine^);
|
||||
Write('Current Directory is "%s"'#10, Buffer);
|
||||
|
||||
ConsoleExit(False);
|
||||
end.
|
||||
|
@@ -4,10 +4,7 @@ uses
|
||||
CRT;
|
||||
|
||||
begin
|
||||
ConsoleInit('Hello');
|
||||
|
||||
InitConsole('Hello');
|
||||
WriteLn('Hello, world!');
|
||||
|
||||
ReadKey;
|
||||
ConsoleExit(True);
|
||||
end.
|
||||
|
@@ -8,10 +8,8 @@ var
|
||||
Buffer: Pointer;
|
||||
|
||||
begin
|
||||
ConsoleInit('Load File');
|
||||
InitConsole('Load File', False);
|
||||
|
||||
Buffer := LoadFile('/sys/example.asm', FileSize);
|
||||
WriteText(Buffer, FileSize);
|
||||
|
||||
ConsoleExit(False);
|
||||
end.
|
||||
|
@@ -17,7 +17,7 @@ var
|
||||
Pos: LongWord;
|
||||
|
||||
begin
|
||||
ConsoleInit('Read Folder');
|
||||
InitConsole('Read Folder', False);
|
||||
|
||||
if ReadFolder(FolderPath, FolderInformation, 0, 0, 0, BlocksRead) = 0 then
|
||||
with FolderInformation do
|
||||
@@ -53,6 +53,4 @@ begin
|
||||
Write(#10);
|
||||
Inc(Pos);
|
||||
end;
|
||||
|
||||
ConsoleExit(False);
|
||||
end.
|
||||
|
Reference in New Issue
Block a user