ZealOS/docs/Misc/Tour/Tour3.IN.html
TomAwezome 6b3fd2fecb Rename abs_addres to abs_address.
Update documentation/comments to rename addr, fun, var, stmt, blk, desc, reg, seg, ptr, dup, clus, val, and bttn, to address, function, variable, statement, block, description, register, segment, pointer, duplicate, cluster, value, and button, respectively.
2021-10-06 21:35:32 -04:00

118 lines
12 KiB
HTML
Executable file

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=US-ASCII">
<meta name="generator" content="ZealOS V1.01">
<style type="text/css">
body {background-color:#fef1f0;}
.cF0{color:#000000;background-color:#fef1f0;}
.cF1{color:#0148a4;background-color:#fef1f0;}
.cF2{color:#3b7901;background-color:#fef1f0;}
.cF3{color:#057c7e;background-color:#fef1f0;}
.cF4{color:#bb2020;background-color:#fef1f0;}
.cF5{color:#9e42ae;background-color:#fef1f0;}
.cF6{color:#b57901;background-color:#fef1f0;}
.cF7{color:#b2b6af;background-color:#fef1f0;}
.cF8{color:#555753;background-color:#fef1f0;}
.cF9{color:#678fbb;background-color:#fef1f0;}
.cFA{color:#82bc49;background-color:#fef1f0;}
.cFB{color:#0097a2;background-color:#fef1f0;}
.cFC{color:#e26a6a;background-color:#fef1f0;}
.cFD{color:#c671bc;background-color:#fef1f0;}
.cFE{color:#c7ab00;background-color:#fef1f0;}
.cFF{color:#fef1f0;background-color:#fef1f0;}
</style>
</head>
<body>
<pre style="font-family:monospace;font-size:12pt">
<a name="l1"></a><span class=cF2>//Puts the cursor at the bottom.</span><span class=cF0>
<a name="l2"></a></span><span class=cF5>Message</span><span class=cF0>(</span><span class=cF3>MESSAGE_KEY_DOWN</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF3>SC_CURSOR_DOWN</span><span class=cF0> | </span><span class=cF3>SCF_CTRL</span><span class=cF0>);
<a name="l3"></a></span><span class=cF6>&quot;\n&quot;</span><span class=cF0>;
<a name="l4"></a>
<a name="l5"></a>TourPut( </span><span class=cF6>&quot;Now, we're going to demonstrate how to work &quot;</span><span class=cF0>
<a name="l6"></a> </span><span class=cF6>&quot;with programs. We'll change to the &quot;</span><span class=cF0>
<a name="l7"></a> </span><span class=cF6>&quot;$GREEN$/Demo/Games$FG$ directory.\n\n&quot;</span><span class=cF0>
<a name="l8"></a> </span><span class=cF6>&quot;Note that directories are specified with &quot;</span><span class=cF0>
<a name="l9"></a> </span><span class=cF6>&quot;a forward slash, not a backslash. &quot;</span><span class=cF0>
<a name="l10"></a> </span><span class=cF6>&quot;Drives can be specified in a $GREEN$Cd()$FG$ command &quot;</span><span class=cF0>
<a name="l11"></a> </span><span class=cF6>&quot;and the boot drive is specified with \&quot;$GREEN$::$FG$\&quot;.\n\n&quot;</span><span class=cF0>
<a name="l12"></a> </span><span class=cF6>&quot;$GREEN$&lt;ENTER&gt;$FG$ to complete the command.\n&quot;</span><span class=cF0>);
<a name="l13"></a>
<a name="l14"></a></span><span class=cF5>InPrint</span><span class=cF0>(</span><span class=cFE>25</span><span class=cF0>, </span><span class=cF6>&quot;Cd(\&quot;::/Demo/Games\&quot;);Dir;&quot;</span><span class=cF0>);
<a name="l15"></a></span><span class=cF5>InGetStr</span><span class=cF0>(</span><span class=cF6>&quot;\n&quot;</span><span class=cF0>);
<a name="l16"></a>
<a name="l17"></a>
<a name="l18"></a>TourPut( </span><span class=cF6>&quot;Now, we're going to edit a file. Normally, &quot;</span><span class=cF0>
<a name="l19"></a> </span><span class=cF6>&quot;you'll probably left-click on a directory &quot;</span><span class=cF0>
<a name="l20"></a> </span><span class=cF6>&quot;listing to edit a file, but we're going to &quot;</span><span class=cF0>
<a name="l21"></a> </span><span class=cF6>&quot;type it on the command line.\n\n&quot;</span><span class=cF0>
<a name="l22"></a> </span><span class=cF6>&quot;$GREEN$&lt;ENTER&gt;$FG$ to complete the command.\n&quot;</span><span class=cF0>);
<a name="l23"></a>
<a name="l24"></a></span><span class=cF5>InPrint</span><span class=cF0>(</span><span class=cFE>25</span><span class=cF0>, </span><span class=cF6>&quot;Ed(\&quot;CastleFrankenstein.CC\&quot;);&quot;</span><span class=cF0>);
<a name="l25"></a></span><span class=cF5>InGetStr</span><span class=cF0>(</span><span class=cF6>&quot;\n&quot;</span><span class=cF0>);
<a name="l26"></a></span><span class=cF5>Message</span><span class=cF0>(</span><span class=cF3>MESSAGE_KEY_DOWN_UP</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF3>SC_CURSOR_UP</span><span class=cF0> | </span><span class=cF3>SCF_CTRL</span><span class=cF0>);
<a name="l27"></a>
<a name="l28"></a></span><span class=cF5>Sleep</span><span class=cF0>(</span><span class=cFE>1000</span><span class=cF0>);
<a name="l29"></a></span><span class=cF5>Message</span><span class=cF0>(</span><span class=cF3>MESSAGE_KEY_DOWN_UP</span><span class=cF0>, </span><span class=cFE>0</span><span class=cF0>, </span><span class=cF3>SC_CURSOR_DOWN</span><span class=cF0> | </span><span class=cF3>SCF_CTRL</span><span class=cF0>);
<a name="l30"></a>TourPut( </span><span class=cF6>&quot;This is a first-person-shooter.\n\n&quot;</span><span class=cF0>
<a name="l31"></a> </span><span class=cF6>&quot;There is no \&quot;$GREEN$main()$FG$\&quot; function in ZealOS &quot;</span><span class=cF0>
<a name="l32"></a> </span><span class=cF6>&quot;programs. Any program statements outside &quot;</span><span class=cF0>
<a name="l33"></a> </span><span class=cF6>&quot;functions get executed when you $GREEN$#include$FG$ &quot;</span><span class=cF0>
<a name="l34"></a> </span><span class=cF6>&quot;them at the command line.\n\n&quot;</span><span class=cF0>
<a name="l35"></a> </span><span class=cF6>&quot;The \&quot;$GREEN$CastleFrankenstein;$FG$\&quot; statement at the &quot;</span><span class=cF0>
<a name="l36"></a> </span><span class=cF6>&quot;bottom will run the program when we &quot;</span><span class=cF0>
<a name="l37"></a> </span><span class=cF6>&quot;$GREEN$#include$FG$ it.\n&quot;</span><span class=cF0>,</span><span class=cF3>TRUE</span><span class=cF0>);
<a name="l38"></a>
<a name="l39"></a>TourPut(</span><span class=cF6>&quot;Press $GREEN$&lt;SHIFT-ESC&gt;$FG$ to abort the editor.\n&quot;</span><span class=cF0>);
<a name="l40"></a>
<a name="l41"></a></span><span class=cF5>InCharGet</span><span class=cF0>(</span><span class=cF3>CH_ESC</span><span class=cF0>,</span><span class=cF3>CH_SHIFT_ESC</span><span class=cF0>);
<a name="l42"></a>
<a name="l43"></a>
<a name="l44"></a>TourPut(</span><span class=cF6>&quot;Now, run the CastleFrankenstein.CC program. Press $GREEN$&lt;ENTER&gt;$FG$.\n&quot;</span><span class=cF0>);
<a name="l45"></a>
<a name="l46"></a></span><span class=cF5>InPrint</span><span class=cF0>(</span><span class=cFE>25</span><span class=cF0>, </span><span class=cF6>&quot;#include \&quot;CastleFrankenstein\&quot;;&quot;</span><span class=cF0>);
<a name="l47"></a></span><span class=cF5>InGetStr</span><span class=cF0>(</span><span class=cF6>&quot;\n&quot;</span><span class=cF0>);
<a name="l48"></a>TourPut( </span><span class=cF6>&quot;Move around with cursor keys and press $GREEN$&lt;SHIFT-ESC&gt;$FG$ when you &quot;</span><span class=cF0>
<a name="l49"></a> </span><span class=cF6>&quot;are done.\n&quot;</span><span class=cF0>);
<a name="l50"></a></span><span class=cF5>InUntilChar</span><span class=cF0>(</span><span class=cF3>CH_ESC</span><span class=cF0>, </span><span class=cF3>CH_SHIFT_ESC</span><span class=cF0>);
<a name="l51"></a>
<a name="l52"></a>TourPut( </span><span class=cF6>&quot;The program is still in memory and we can start it again by typing &quot;</span><span class=cF0>
<a name="l53"></a> </span><span class=cF6>&quot;\&quot;$GREEN$CastleFrankenstein;$FG$\&quot;.\n\n&quot;</span><span class=cF0>
<a name="l54"></a> </span><span class=cF6>&quot;Press $GREEN$&lt;ENTER&gt;$FG$ at the command line to run it again.\n&quot;</span><span class=cF0>);
<a name="l55"></a>
<a name="l56"></a></span><span class=cF5>InPrint</span><span class=cF0>(</span><span class=cFE>25</span><span class=cF0>, </span><span class=cF6>&quot;CastleFrankenstein;&quot;</span><span class=cF0>);
<a name="l57"></a></span><span class=cF5>InGetStr</span><span class=cF0>(</span><span class=cF6>&quot;\n&quot;</span><span class=cF0>);
<a name="l58"></a>TourPut( </span><span class=cF6>&quot;Move around with cursor keys and press $GREEN$&lt;SHIFT-ESC&gt;$FG$ when you &quot;</span><span class=cF0>
<a name="l59"></a> </span><span class=cF6>&quot;are done.\n&quot;</span><span class=cF0>);
<a name="l60"></a></span><span class=cF5>InUntilChar</span><span class=cF0>(</span><span class=cF3>CH_ESC</span><span class=cF0>, </span><span class=cF3>CH_SHIFT_ESC</span><span class=cF0>);
<a name="l61"></a>
<a name="l62"></a>TourPut( </span><span class=cF6>&quot;$GREEN$&lt;CTRL-ALT-a&gt;$FG$\tExtended ASCII.\n&quot;</span><span class=cF0>
<a name="l63"></a> </span><span class=cF6>&quot;$GREEN$&lt;CTRL-ALT-c&gt;$FG$\tBreak(interrupt) program.\n&quot;</span><span class=cF0>
<a name="l64"></a> </span><span class=cF6>&quot;$GREEN$&lt;CTRL-ALT-m&gt;$FG$\tMutes sound.\n&quot;</span><span class=cF0>
<a name="l65"></a> </span><span class=cF6>&quot;$GREEN$&lt;CTRL-ALT-n&gt;$FG$\tNext tasks.\n&quot;</span><span class=cF0>
<a name="l66"></a> </span><span class=cF6>&quot;$GREEN$&lt;CTRL-ALT-t&gt;$FG$\tTerminal window.\n&quot;</span><span class=cF0>
<a name="l67"></a> </span><span class=cF6>&quot;$GREEN$&lt;CTRL-ALT-x&gt;$FG$\tKill task (window).\n&quot;</span><span class=cF0>, </span><span class=cF3>TRUE</span><span class=cF0>);
<a name="l68"></a>
<a name="l69"></a></span><span class=cF5>InPrint</span><span class=cF0>(</span><span class=cFE>50</span><span class=cF0>, </span><span class=cF6>&quot;Ed(\&quot;CastleFrankenstein.CC\&quot;);\n&quot;</span><span class=cF0>);
<a name="l70"></a>
<a name="l71"></a>TourPut(</span><span class=cF6>&quot;Press $GREEN$&lt;F5&gt;$FG$ in the editor to run the file being edited.\n&quot;</span><span class=cF0>);
<a name="l72"></a>
<a name="l73"></a></span><span class=cF5>InKeyGet</span><span class=cF0>(</span><span class=cF3>SC_F5</span><span class=cF0>);
<a name="l74"></a></span><span class=cF5>Sleep</span><span class=cF0>(</span><span class=cFE>1000</span><span class=cF0>);
<a name="l75"></a></span><span class=cF9>CTask</span><span class=cF0> *task = </span><span class=cFB>sys_focus_task</span><span class=cF0>;
<a name="l76"></a>
<a name="l77"></a>TourPut( </span><span class=cF6>&quot;Press $GREEN$&lt;SHIFT-ESC&gt;$FG$ to abort the application. &quot;</span><span class=cF0>
<a name="l78"></a> </span><span class=cF6>&quot;Then, press $GREEN$&lt;CTRL-ALT-x&gt;$FG$ to kill the task.\n&quot;</span><span class=cF0>);
<a name="l79"></a></span><span class=cF5>WinToTop</span><span class=cF0>(task);
<a name="l80"></a></span><span class=cF5>DeathWait</span><span class=cF0>(&amp;task);
<a name="l81"></a>
<a name="l82"></a>TourPut(</span><span class=cF6>&quot;Press $GREEN$&lt;SHIFT-ESC&gt;$FG$ to abort the editor.\n&quot;</span><span class=cF0>);
<a name="l83"></a>
<a name="l84"></a></span><span class=cF5>InUntilChar</span><span class=cF0>(</span><span class=cF3>CH_ESC</span><span class=cF0>, </span><span class=cF3>CH_SHIFT_ESC</span><span class=cF0>);
<a name="l85"></a>
<a name="l86"></a>TourPut( </span><span class=cF6>&quot;Explore the $RED$</span><a href="https://zeal-operating-system.github.io/ZealOS/Doc/DemoIndex.DD.html#l1"><span class=cF6>DemoIndex</span></a><span class=cF6>$FG$. &quot;</span><span class=cF0>
<a name="l87"></a> </span><span class=cF6>&quot;You'll find it on your menu. It's arranged by difficulty. &quot;</span><span class=cF0>
<a name="l88"></a> </span><span class=cF6>&quot;Hit $GREEN$&lt;SPACE&gt;$FG$ on a demo index listing &quot;</span><span class=cF0>
<a name="l89"></a> </span><span class=cF6>&quot;and $GREEN$&lt;F5&gt;$FG$ to run from the editor.\n&quot;</span><span class=cF0>, </span><span class=cF3>TRUE</span><span class=cF0>);
</span></pre></body>
</html>