about summary refs log tree commit diff stats
path: root/shell
Commit message (Expand)AuthorAgeFilesLines
* .Kartik K. Agaram2021-07-081-4/+4
* primitives for double-bufferingKartik K. Agaram2021-07-051-4/+152
* shell: fix clear on screensKartik K. Agaram2021-07-051-1/+1
* expose Mu implementation of 'bezier'Kartik K. Agaram2021-07-051-1/+256
* replace 'circle' with Mu implementationKartik K. Agaram2021-07-052-19/+161
* replace 'vline' with Mu implementationKartik K. Agaram2021-07-052-6/+162
* replace 'hline' with Mu implementationKartik K. Agaram2021-07-052-9/+165
* replace 'line' with Mu implementationKartik K. Agaram2021-07-052-32/+196
* .Kartik K. Agaram2021-07-051-1/+1
* .Kartik K. Agaram2021-07-051-140/+140
* reading from streamsKartik K. Agaram2021-07-034-22/+152
* alistsKartik K. Agaram2021-07-031-0/+13
* new primitive: cons?Kartik K. Agaram2021-07-031-1/+42
* .Kartik K. Agaram2021-07-031-5/+10
* .Kartik K. Agaram2021-07-031-4/+4
* reorg primitives on screenKartik K. Agaram2021-07-022-43/+80
* clean up final abort in macroexpandKartik K. Agaram2021-06-302-1/+14
* delete a known issueKartik Agaram2021-06-301-3/+0
* .Kartik K. Agaram2021-06-271-5/+11
* simplify Qemu instructionsKartik K. Agaram2021-06-271-12/+10
* .Kartik Agaram2021-06-241-3/+3
* .Kartik Agaram2021-06-241-1/+1
* .Kartik Agaram2021-06-241-1/+1
* .Kartik Agaram2021-06-231-1/+1
* .Kartik Agaram2021-06-231-8/+0
* .Kartik Agaram2021-06-231-1/+1
* .Kartik Agaram2021-06-231-2/+2
* .Kartik Agaram2021-06-231-4/+4
* .Kartik Agaram2021-06-231-1/+1
* one more bug, and documentation for infixKartik K. Agaram2021-06-234-27/+80
* .Kartik K. Agaram2021-06-231-3/+3
* .Kartik K. Agaram2021-06-231-8/+8
* one more bugKartik K. Agaram2021-06-232-9/+22
* start using infix in data diskKartik K. Agaram2021-06-231-57/+54
* all tests passing again; infix seems doneKartik K. Agaram2021-06-222-1/+7
* infix tests passing but something's still brokenKartik K. Agaram2021-06-221-2/+48
* 2 failing tests remainingKartik K. Agaram2021-06-221-2/+44
* almost there; this is encouragingKartik K. Agaram2021-06-221-16/+21
* beginnings of tokenization within symbolsKartik K. Agaram2021-06-222-17/+68
* .Kartik K. Agaram2021-06-221-11/+3
* clean up lexical categoriesKartik K. Agaram2021-06-222-142/+48
* snapshotKartik K. Agaram2021-06-221-3/+32
* .Kartik K. Agaram2021-06-221-3/+5
* snapshot: infixKartik K. Agaram2021-06-225-9/+542
* .Kartik K. Agaram2021-06-213-67/+89
* start implementing infixKartik K. Agaram2021-06-211-281/+3
* .Kartik K. Agaram2021-06-201-3/+3
* shell: now no definitions with long linesKartik K. Agaram2021-06-201-3/+7
* shell: shrink definition widths in a few placesKartik K. Agaram2021-06-201-12/+14
* this is how we create aliasesKartik K. Agaram2021-06-201-1/+1
pan>} a { color:inherit; } * { font-size:12pt; font-size: 1em; } .subxComment { color: #005faf; } .LineNr { } .SpecialChar { color: #d70000; } --> </style> <script type='text/javascript'> <!-- /* function to open any folds containing a jumped-to line before jumping to it */ function JumpToLine() { var lineNum; lineNum = window.location.hash; lineNum = lineNum.substr(1); /* strip off '#' */ if (lineNum.indexOf('L') == -1) { lineNum = 'L'+lineNum; } var lineElem = document.getElementById(lineNum); /* Always jump to new location even if the line was hidden inside a fold, or * we corrected the raw number to a line ID. */ if (lineElem) { lineElem.scrollIntoView(true); } return true; } if ('onhashchange' in window) { window.onhashchange = JumpToLine; } --> </script> </head> <body onload='JumpToLine();'> <a href='https://github.com/akkartik/mu/blob/master/mu-init.subx'>https://github.com/akkartik/mu/blob/master/mu-init.subx</a> <pre id='vimCodeElement'> <span id="L1" class="LineNr"> 1 </span><span class="subxComment"># Initialize the minimal runtime for Mu programs.</span> <span id="L2" class="LineNr"> 2 </span><span class="subxComment">#</span> <span id="L3" class="LineNr"> 3 </span><span class="subxComment"># See translate_mu for how this file is used.</span> <span id="L4" class="LineNr"> 4 </span><span class="subxComment">#</span> <span id="L5" class="LineNr"> 5 </span><span class="subxComment"># Mu programs start at a function called 'main' with this signature:</span> <span id="L6" class="LineNr"> 6 </span><span class="subxComment"># fn main args: (addr array kernel-string) -&gt; exit-status/ebx: int</span> <span id="L7" class="LineNr"> 7 </span><span class="subxComment"># If your program doesn't need commandline arguments you can drop it:</span> <span id="L8" class="LineNr"> 8 </span><span class="subxComment"># fn main -&gt; exit-status/ebx: int</span> <span id="L9" class="LineNr"> 9 </span><span class="subxComment">#</span> <span id="L10" class="LineNr">10 </span><span class="subxComment"># Notice that the output must be in ebx, so that the exit() syscall can pick</span> <span id="L11" class="LineNr">11 </span><span class="subxComment"># it up.</span> <span id="L12" class="LineNr">12 </span> <span id="L13" class="LineNr">13 </span>== code <span id="L14" class="LineNr">14 </span> <span id="L15" class="LineNr">15 </span><span class="SpecialChar">Entry</span>: <span id="L16" class="LineNr">16 </span> <span class="subxComment"># we don't use ebp in Entry; just initialize it</span> <span id="L17" class="LineNr">17 </span> bd/copy-to-ebp 0/imm32 <span id="L18" class="LineNr">18 </span> <span class="subxComment"># var args/eax: (addr array kernel-string)</span> <span id="L19" class="LineNr">19 </span> 89/&lt;- %eax 4/r32/esp <span id="L20" class="LineNr">20 </span> <span class="subxComment"># initialize the heap</span> <span id="L21" class="LineNr">21 </span> (<a href='053new-segment.subx.html#L41'>new-segment</a> *<span class="SpecialChar"><a href='069allocate.subx.html#L29'>Heap-size</a></span> <span class="SpecialChar"><a href='069allocate.subx.html#L22'>Heap</a></span>) <span id="L22" class="LineNr">22 </span> <span class="subxComment"># run Mu program</span> <span id="L23" class="LineNr">23 </span> (<a href='mu-init-test.subx.html#L7'>main</a> %eax) <span id="L24" class="LineNr">24 </span> <span class="subxComment"># exit</span> <span id="L25" class="LineNr">25 </span> (syscall_exit) </pre> </body> </html> <!-- vim: set foldmethod=manual : -->