ZealOS/docs/Doc/CharOverview.DD.html

59 lines
4.6 KiB
HTML
Raw Normal View History

2021-07-03 05:07:57 +01:00
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=US-ASCII">
2021-10-18 06:49:09 +01:00
<meta name="generator" content="ZealOS V1.03">
2021-07-03 05:07:57 +01:00
<style type="text/css">
body {background-color:#1f1f1f;}
.cF0{color:#e3e3e3;background-color:#1f1f1f;}
.cF1{color:#4f84a6;background-color:#1f1f1f;}
.cF2{color:#73a255;background-color:#1f1f1f;}
.cF3{color:#297582;background-color:#1f1f1f;}
.cF4{color:#b34f4b;background-color:#1f1f1f;}
.cF5{color:#8a52c3;background-color:#1f1f1f;}
.cF6{color:#b7822f;background-color:#1f1f1f;}
.cF7{color:#444444;background-color:#1f1f1f;}
.cF8{color:#6d6d6d;background-color:#1f1f1f;}
.cF9{color:#94bfde;background-color:#1f1f1f;}
.cFA{color:#a1ce97;background-color:#1f1f1f;}
.cFB{color:#6db4be;background-color:#1f1f1f;}
.cFC{color:#e88e88;background-color:#1f1f1f;}
.cFD{color:#ca94e8;background-color:#1f1f1f;}
.cFE{color:#d4b475;background-color:#1f1f1f;}
.cFF{color:#1f1f1f;background-color:#1f1f1f;}
2021-07-03 05:07:57 +01:00
</style>
</head>
<body>
<pre style="font-family:monospace;font-size:12pt">
<a name="l1"></a><span class=cF5> Char Overview</span><span class=cF0>
2021-07-03 05:07:57 +01:00
<a name="l2"></a>
<a name="l3"></a>A </span><span class=cF2>Char</span><span class=cF0>acter is a single byte holding an ASCII code for a letter, num or sym. The </span><span class=cF2>ZealOS</span><span class=cF0> term is a </span><span class=cF2>U8</span><span class=cF0>.
<a name="l4"></a>
<a name="l5"></a>Standard ASCII values range from 0 to 127. Values below 32 are ctrl key's. So, an ASCII #3 is a </span><span class=cF2>&lt;CTRL-c&gt;</span><span class=cF0>. ZealOS uses a
<a name="l6"></a>couple nonstandard values below 32. See </span><a href="https://zeal-operating-system.github.io/ZealOS/Kernel/KernelA.HH.html#l4138"><span class=cF4>Char Definitions</span></a><span class=cF0>.
2021-07-03 05:07:57 +01:00
<a name="l7"></a>
<a name="l8"></a>ASCII #5 is the cursor location in a saved file.
2021-07-03 05:07:57 +01:00
<a name="l9"></a>ASCII #28 is </span><span class=cF2>&lt;SHIFT-ESC&gt;</span><span class=cF0>.
<a name="l10"></a>
<a name="l11"></a>ZealOS ASCII is 8-bit instead of 7-bit, so it also uses the range from 128-255. Press </span><span class=cF2>&lt;CTRL-ALT-a&gt;</span><span class=cF0> to see shapes for 128-255.
<a name="l12"></a>Technically, </span><span class=cF2>&lt;CTRL-ALT-a&gt;</span><span class=cF0> are </span><span class=cF4><u>screen codes</u></span><span class=cF0>.
<a name="l13"></a>
<a name="l14"></a>A </span><span class=cF2>Key</span><span class=cF0> is typically specified with a scan code. ZealOS scan codes contain the key value in the lowest </span><span class=cF2>U8</span><span class=cF0>, and flags in the
<a name="l15"></a>upper 3 bytes. See </span><a href="https://zeal-operating-system.github.io/ZealOS/Kernel/KernelA.HH.html#l4192"><span class=cF4>Scan Code Flags</span></a><span class=cF0> and </span><a href="https://zeal-operating-system.github.io/ZealOS/Kernel/KernelA.HH.html#l4226"><span class=cF4>Scan Codes</span></a><span class=cF0>.
2021-07-03 05:07:57 +01:00
<a name="l16"></a>
<a name="l17"></a>ZealOS stores scan codes in 8 bytes.
<a name="l18"></a> </span><span class=cF2>Byte 0</span><span class=cF0> is the code. NumPad keys, SHIFT, ALT, CTRL and GUI keys combined.
<a name="l19"></a> </span><span class=cF2>Byte 1-3</span><span class=cF0> are </span><a href="https://zeal-operating-system.github.io/ZealOS/Kernel/KernelA.HH.html#l4175"><span class=cF4>flags</span></a><span class=cF0>
2021-07-03 05:07:57 +01:00
<a name="l20"></a>
<a name="l21"></a>The upper 4-bytes are copied from lower 4-bytes.
<a name="l22"></a> </span><span class=cF2>Byte 4</span><span class=cF0> is the code. Left, Right and NumPad keys distinct.
<a name="l23"></a> </span><span class=cF2>Byte 5-7</span><span class=cF0> are </span><a href="https://zeal-operating-system.github.io/ZealOS/Kernel/KernelA.HH.html#l4175"><span class=cF4>flags</span></a><span class=cF0>
2021-07-03 05:07:57 +01:00
<a name="l24"></a>
<a name="l25"></a>Run the program </span><a href="https://zeal-operating-system.github.io/ZealOS/Demo/MessageLoop.CC.html#l1"><span class=cF4>::/Demo/MessageLoop.CC</span></a><span class=cF0> to examine scan code. Press </span><span class=cF2>&lt;CTRL-SHIFT-l&gt;</span><span class=cF0> and &quot;Insert ASCII/ScanCode&quot;.
2021-07-03 05:07:57 +01:00
<a name="l26"></a>
<a name="l27"></a>See </span><a href="https://zeal-operating-system.github.io/ZealOS/Doc/KeyAlloc.DD.html#l1"><span class=cF4>Key Allocations</span></a><span class=cF0> and </span><a href="https://zeal-operating-system.github.io/ZealOS/Kernel/KernelA.HH.html#l3675"><span class=cF4>CKbdStateGlobals</span></a><span class=cF0>.
2021-07-03 05:07:57 +01:00
<a name="l28"></a>
<a name="l29"></a>A </span><span class=cF2>String</span><span class=cF0> is a bunch of ASCII characters terminated with a zero.
</span></pre></body>
</html>