mirror of
https://github.com/vapaamies/KolibriOS.git
synced 2024-11-09 09:40:27 +01:00
Console character map example added
This commit is contained in:
parent
24094ee87c
commit
731fbb7c1b
30
Examples/Console/CharMap/CharMap.dpr
Normal file
30
Examples/Console/CharMap/CharMap.dpr
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
program CharMap;
|
||||||
|
|
||||||
|
uses
|
||||||
|
CRT;
|
||||||
|
|
||||||
|
const
|
||||||
|
HexDigits: array[$0..$F] of KolibriChar = '0123456789ABCDEF';
|
||||||
|
|
||||||
|
var
|
||||||
|
CharLine: array[$0..$F] of KolibriChar;
|
||||||
|
Line, Ch: Byte;
|
||||||
|
begin
|
||||||
|
InitConsole('Character map');
|
||||||
|
|
||||||
|
con_write_asciiz(' ');
|
||||||
|
con_write_string(HexDigits, Length(HexDigits));
|
||||||
|
con_write_asciiz(#10);
|
||||||
|
|
||||||
|
for Line := Low(HexDigits) to High(HexDigits) do
|
||||||
|
begin
|
||||||
|
con_write_string(@HexDigits[Line], 1);
|
||||||
|
con_write_asciiz(' ');
|
||||||
|
for Ch := Low(CharLine) to High(CharLine) do
|
||||||
|
CharLine[Ch] := Chr(Line shl 4 + Ch);
|
||||||
|
con_set_flags(con_get_flags or CON_IGNORE_SPECIALS);
|
||||||
|
con_write_string(CharLine, Length(CharLine));
|
||||||
|
con_set_flags(con_get_flags and not CON_IGNORE_SPECIALS);
|
||||||
|
con_write_asciiz(#10);
|
||||||
|
end;
|
||||||
|
end.
|
1
Examples/Console/CharMap/build.bat
Normal file
1
Examples/Console/CharMap/build.bat
Normal file
@ -0,0 +1 @@
|
|||||||
|
@call "%~dp0..\..\..\Lib\build.bat" "%~dp0CharMap"
|
@ -9,13 +9,16 @@ MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
|
|||||||
DCC = $(ROOT)\bin\dcc32.exe $**
|
DCC = $(ROOT)\bin\dcc32.exe $**
|
||||||
BRCC = $(ROOT)\bin\brcc32.exe $**
|
BRCC = $(ROOT)\bin\brcc32.exe $**
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
PROJECTS = ColorButtons.exe ConsoleColors.exe DateTime.exe DrawImage.exe DrawImageEx.exe DrawText.exe \
|
PROJECTS = CharMap.exe ColorButtons.exe ConsoleColors.exe DateTime.exe DrawImage.exe DrawImageEx.exe DrawText.exe \
|
||||||
Echo.exe GetCurrentDirectory.exe GetPixel.exe GetPointOwner.exe Hello.exe HelloGUI.exe LoadFile.exe \
|
Echo.exe GetCurrentDirectory.exe GetPixel.exe GetPointOwner.exe Hello.exe HelloGUI.exe LoadFile.exe ReadFolder.exe \
|
||||||
ReadFolder.exe Screenshot.exe SetCursor.exe SetPixel.exe SetWindowPos.exe
|
Screenshot.exe SetCursor.exe SetPixel.exe SetWindowPos.exe
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
default: $(PROJECTS)
|
default: $(PROJECTS)
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
CharMap.exe: Console\CharMap\CharMap.dpr
|
||||||
|
$(DCC)
|
||||||
|
|
||||||
ColorButtons.exe: GUI\ColorButtons\ColorButtons.dpr
|
ColorButtons.exe: GUI\ColorButtons\ColorButtons.dpr
|
||||||
$(DCC)
|
$(DCC)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user