This commit is contained in:
parent
b663b5797a
commit
3120f938c6
|
@ -85,7 +85,7 @@ if ('onhashchange' in window) {
|
|||
<span id="L28" class="LineNr">28 </span> c1/shift 4/subop/left %eax 0xa/imm8
|
||||
<span id="L29" class="LineNr">29 </span> 03/add-> *(ebp+8) 0/r32/eax
|
||||
<span id="L30" class="LineNr">30 </span> <span class="subxComment"># eax += location of frame buffer</span>
|
||||
<span id="L31" class="LineNr">31 </span> 03/add-> *<span class="SpecialChar">Video-memory-addr</span> 0/r32/eax
|
||||
<span id="L31" class="LineNr">31 </span> 03/add-> *<span class="SpecialChar"><a href='boot.subx.html#L547'>Video-memory-addr</a></span> 0/r32/eax
|
||||
<span id="L32" class="LineNr">32 </span> <span class="subxComment"># *eax = color</span>
|
||||
<span id="L33" class="LineNr">33 </span> 8b/-> *(ebp+0x10) 1/r32/ecx
|
||||
<span id="L34" class="LineNr">34 </span> 88/byte<- *eax 1/r32/CL
|
||||
|
|
|
@ -84,7 +84,7 @@ if ('onhashchange' in window) {
|
|||
<span id="L27" class="LineNr"> 27 </span> <span class="subxComment"># var letter-bitmap/esi = font[g]</span>
|
||||
<span id="L28" class="LineNr"> 28 </span> 8b/-> *(ebp+8) 6/r32/esi
|
||||
<span id="L29" class="LineNr"> 29 </span> c1 4/subop/shift-left %esi 4/imm8
|
||||
<span id="L30" class="LineNr"> 30 </span> 81 0/subop/add %esi <span class="SpecialChar">Font</span>/imm32
|
||||
<span id="L30" class="LineNr"> 30 </span> 81 0/subop/add %esi <span class="SpecialChar"><a href='boot.subx.html#L568'>Font</a></span>/imm32
|
||||
<span id="L31" class="LineNr"> 31 </span> <span class="subxComment"># if (letter-bitmap >= 0x9400) return # characters beyond ASCII currently not supported</span>
|
||||
<span id="L32" class="LineNr"> 32 </span> 81 7/subop/compare %esi 0x9400/imm32
|
||||
<span id="L33" class="LineNr"> 33 </span> 7d/jump-if->= $draw-grapheme-on-real-screen:end/disp8
|
||||
|
|
|
@ -64,81 +64,84 @@ if ('onhashchange' in window) {
|
|||
<span id="L9" class="LineNr"> 9 </span><span class="PreProc">sig</span> <a href='102keyboard.subx.html#L9'>read-key</a> kbd: (addr keyboard)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: byte
|
||||
<span id="L10" class="LineNr">10 </span>
|
||||
<span id="L11" class="LineNr">11 </span><span class="muComment"># disk</span>
|
||||
<span id="L12" class="LineNr">12 </span><span class="PreProc">sig</span> load-first-sector-from-primary-bus-secondary-drive out: (addr stream byte)
|
||||
<span id="L13" class="LineNr">13 </span><span class="PreProc">sig</span> store-first-sector-to-primary-bus-secondary-drive out: (addr stream byte)
|
||||
<span id="L12" class="LineNr">12 </span><span class="PreProc">sig</span> <a href='boot.subx.html#L817'>load-first-sector-from-primary-bus-secondary-drive</a> out: (addr stream byte)
|
||||
<span id="L13" class="LineNr">13 </span><span class="PreProc">sig</span> <a href='boot.subx.html#L864'>store-first-sector-to-primary-bus-secondary-drive</a> out: (addr stream byte)
|
||||
<span id="L14" class="LineNr">14 </span>
|
||||
<span id="L15" class="LineNr">15 </span><span class="muComment"># tests</span>
|
||||
<span id="L16" class="LineNr">16 </span><span class="PreProc">sig</span> <a href='104test.subx.html#L5'>count-test-failure</a>
|
||||
<span id="L17" class="LineNr">17 </span><span class="PreProc">sig</span> <a href='104test.subx.html#L17'>num-test-failures</a><span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: int
|
||||
<span id="L18" class="LineNr">18 </span>
|
||||
<span id="L19" class="LineNr">19 </span><span class="PreProc">sig</span> <a href='105string-equal.subx.html#L8'>string-equal?</a> s: (addr array byte), benchmark: (addr array byte)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: boolean
|
||||
<span id="L20" class="LineNr">20 </span><span class="PreProc">sig</span> <a href='105string-equal.subx.html#L50'>string-starts-with?</a> s: (addr array byte), benchmark: (addr array byte)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: boolean
|
||||
<span id="L21" class="LineNr">21 </span><span class="PreProc">sig</span> <a href='105string-equal.subx.html#L213'>check-strings-equal</a> s: (addr array byte), expected: (addr array byte), msg: (addr array byte)
|
||||
<span id="L22" class="LineNr">22 </span>
|
||||
<span id="L23" class="LineNr">23 </span><span class="muComment"># streams</span>
|
||||
<span id="L24" class="LineNr">24 </span><span class="PreProc">sig</span> <a href='106stream.subx.html#L20'>clear-stream</a> f: (addr stream _)
|
||||
<span id="L25" class="LineNr">25 </span><span class="PreProc">sig</span> <a href='106stream.subx.html#L59'>rewind-stream</a> f: (addr stream _)
|
||||
<span id="L26" class="LineNr">26 </span><span class="PreProc">sig</span> <a href='109stream-equal.subx.html#L9'>stream-data-equal?</a> f: (addr stream byte), s: (addr array byte)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: boolean
|
||||
<span id="L27" class="LineNr">27 </span><span class="PreProc">sig</span> <a href='109stream-equal.subx.html#L194'>check-stream-equal</a> f: (addr stream byte), s: (addr array byte), msg: (addr array byte)
|
||||
<span id="L28" class="LineNr">28 </span><span class="PreProc">sig</span> <a href='109stream-equal.subx.html#L230'>next-stream-line-equal?</a> f: (addr stream byte), s: (addr array byte)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: boolean
|
||||
<span id="L29" class="LineNr">29 </span><span class="PreProc">sig</span> <a href='109stream-equal.subx.html#L565'>check-next-stream-line-equal</a> f: (addr stream byte), s: (addr array byte), msg: (addr array byte)
|
||||
<span id="L30" class="LineNr">30 </span><span class="PreProc">sig</span> <a href='108write.subx.html#L11'>write</a> f: (addr stream byte), s: (addr array byte)
|
||||
<span id="L31" class="LineNr">31 </span><span class="PreProc">sig</span> <a href='113write-stream.subx.html#L8'>write-stream</a> f: (addr stream byte), s: (addr stream byte)
|
||||
<span id="L32" class="LineNr">32 </span><span class="PreProc">sig</span> <a href='112read-byte.subx.html#L13'>read-byte</a> s: (addr stream byte)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: byte
|
||||
<span id="L33" class="LineNr">33 </span><span class="PreProc">sig</span> <a href='115write-byte.subx.html#L12'>append-byte</a> f: (addr stream byte), n: int <span class="muComment"># really just a byte, but I want to pass in literal numbers</span>
|
||||
<span id="L34" class="LineNr">34 </span><span class="muComment">#sig to-hex-char in/eax: int -> out/eax: int</span>
|
||||
<span id="L35" class="LineNr">35 </span><span class="PreProc">sig</span> <a href='117write-int-hex.subx.html#L21'>append-byte-hex</a> f: (addr stream byte), n: int <span class="muComment"># really just a byte, but I want to pass in literal numbers</span>
|
||||
<span id="L36" class="LineNr">36 </span><span class="PreProc">sig</span> <a href='117write-int-hex.subx.html#L92'>write-int32-hex</a> f: (addr stream byte), n: int
|
||||
<span id="L37" class="LineNr">37 </span><span class="PreProc">sig</span> <a href='117write-int-hex.subx.html#L123'>write-int32-hex-bits</a> f: (addr stream byte), n: int, bits: int
|
||||
<span id="L38" class="LineNr">38 </span><span class="PreProc">sig</span> <a href='118parse-hex-int.subx.html#L9'>hex-int?</a> in: (addr slice)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: boolean
|
||||
<span id="L39" class="LineNr">39 </span><span class="PreProc">sig</span> <a href='118parse-hex-int.subx.html#L354'>parse-hex-int</a> in: (addr array byte)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: int
|
||||
<span id="L40" class="LineNr">40 </span><span class="PreProc">sig</span> <a href='118parse-hex-int.subx.html#L387'>parse-hex-int-from-slice</a> in: (addr slice)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: int
|
||||
<span id="L41" class="LineNr">41 </span><span class="muComment">#sig parse-hex-int-helper start: (addr byte), end: (addr byte) -> _/eax: int</span>
|
||||
<span id="L42" class="LineNr">42 </span><span class="PreProc">sig</span> <a href='118parse-hex-int.subx.html#L701'>hex-digit?</a> c: byte<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: boolean
|
||||
<span id="L43" class="LineNr">43 </span><span class="muComment">#sig from-hex-char in/eax: byte -> out/eax: nibble</span>
|
||||
<span id="L44" class="LineNr">44 </span><span class="PreProc">sig</span> <a href='311decimal-int.subx.html#L23'>parse-decimal-int</a> in: (addr array byte)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: int
|
||||
<span id="L45" class="LineNr">45 </span><span class="PreProc">sig</span> <a href='311decimal-int.subx.html#L4'>parse-decimal-int-from-slice</a> in: (addr slice)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: int
|
||||
<span id="L46" class="LineNr">46 </span><span class="PreProc">sig</span> <a href='311decimal-int.subx.html#L48'>parse-decimal-int-from-stream</a> in: (addr stream byte)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: int
|
||||
<span id="L47" class="LineNr">47 </span><span class="muComment">#sig parse-decimal-int-helper start: (addr byte), end: (addr byte) -> _/eax: int</span>
|
||||
<span id="L48" class="LineNr">48 </span><span class="PreProc">sig</span> <a href='311decimal-int.subx.html#L312'>decimal-size</a> n: int<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: int
|
||||
<span id="L49" class="LineNr">49 </span><span class="muComment">#sig allocate ad: (addr allocation-descriptor), n: int, out: (addr handle _)</span>
|
||||
<span id="L50" class="LineNr">50 </span><span class="muComment">#sig allocate-raw ad: (addr allocation-descriptor), n: int, out: (addr handle _)</span>
|
||||
<span id="L51" class="LineNr">51 </span><span class="PreProc">sig</span> <a href='120allocate.subx.html#L226'>lookup</a> h: (handle _T)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: (addr _T)
|
||||
<span id="L52" class="LineNr">52 </span><span class="PreProc">sig</span> <a href='120allocate.subx.html#L424'>handle-equal?</a> a: (handle _T), b: (handle _T)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: boolean
|
||||
<span id="L53" class="LineNr">53 </span><span class="PreProc">sig</span> <a href='120allocate.subx.html#L455'>copy-handle</a> src: (handle _T), dest: (addr handle _T)
|
||||
<span id="L54" class="LineNr">54 </span><span class="muComment">#sig allocate-region ad: (addr allocation-descriptor), n: int, out: (addr handle allocation-descriptor)</span>
|
||||
<span id="L55" class="LineNr">55 </span><span class="muComment">#sig allocate-array ad: (addr allocation-descriptor), n: int, out: (addr handle _)</span>
|
||||
<span id="L56" class="LineNr">56 </span><span class="PreProc">sig</span> <a href='120allocate.subx.html#L669'>copy-array</a> ad: (addr allocation-descriptor), src: (addr array _T), out: (addr handle array _T)
|
||||
<span id="L57" class="LineNr">57 </span><span class="muComment">#sig zero-out start: (addr byte), size: int</span>
|
||||
<span id="L58" class="LineNr">58 </span><span class="PreProc">sig</span> <a href='123slice.subx.html#L9'>slice-empty?</a> s: (addr slice)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: boolean
|
||||
<span id="L59" class="LineNr">59 </span><span class="PreProc">sig</span> <a href='123slice.subx.html#L120'>slice-equal?</a> s: (addr slice), p: (addr array byte)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: boolean
|
||||
<span id="L60" class="LineNr">60 </span><span class="PreProc">sig</span> <a href='123slice.subx.html#L487'>slice-starts-with?</a> s: (addr slice), head: (addr array byte)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: boolean
|
||||
<span id="L61" class="LineNr">61 </span><span class="PreProc">sig</span> <a href='123slice.subx.html#L793'>write-slice</a> out: (addr stream byte), s: (addr slice)
|
||||
<span id="L62" class="LineNr">62 </span><span class="muComment"># bad name alert</span>
|
||||
<span id="L63" class="LineNr">63 </span><span class="PreProc">sig</span> <a href='123slice.subx.html#L901'>slice-to-string</a> ad: (addr allocation-descriptor), in: (addr slice), out: (addr handle array byte)
|
||||
<span id="L64" class="LineNr">64 </span><span class="PreProc">sig</span> <a href='126write-int-decimal.subx.html#L8'>write-int32-decimal</a> out: (addr stream byte), n: int
|
||||
<span id="L65" class="LineNr">65 </span><span class="PreProc">sig</span> <a href='126write-int-decimal.subx.html#L299'>decimal-digit?</a> c: grapheme<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: boolean
|
||||
<span id="L66" class="LineNr">66 </span><span class="PreProc">sig</span> <a href='126write-int-decimal.subx.html#L398'>to-decimal-digit</a> in: grapheme<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: int
|
||||
<span id="L67" class="LineNr">67 </span><span class="muComment"># bad name alert</span>
|
||||
<span id="L68" class="LineNr">68 </span><span class="muComment"># next-word really tokenizes</span>
|
||||
<span id="L69" class="LineNr">69 </span><span class="muComment"># next-raw-word really reads whitespace-separated words</span>
|
||||
<span id="L70" class="LineNr">70 </span><span class="PreProc">sig</span> <a href='127next-word.subx.html#L11'>next-word</a> line: (addr stream byte), out: (addr slice) <span class="muComment"># skips '#' comments</span>
|
||||
<span id="L71" class="LineNr">71 </span><span class="PreProc">sig</span> <a href='127next-word.subx.html#L306'>next-raw-word</a> line: (addr stream byte), out: (addr slice) <span class="muComment"># does not skip '#' comments</span>
|
||||
<span id="L72" class="LineNr">72 </span><span class="PreProc">sig</span> <a href='309stream.subx.html#L6'>stream-empty?</a> s: (addr stream _)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: boolean
|
||||
<span id="L73" class="LineNr">73 </span><span class="PreProc">sig</span> <a href='309stream.subx.html#L30'>stream-full?</a> s: (addr stream _)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: boolean
|
||||
<span id="L74" class="LineNr">74 </span><span class="PreProc">sig</span> <a href='310copy-bytes.subx.html#L60'>stream-to-array</a> in: (addr stream _), out: (addr handle array _)
|
||||
<span id="L75" class="LineNr">75 </span><span class="PreProc">sig</span> <a href='310copy-bytes.subx.html#L120'>unquote-stream-to-array</a> in: (addr stream _), out: (addr handle array _)
|
||||
<span id="L76" class="LineNr">76 </span><span class="PreProc">sig</span> <a href='309stream.subx.html#L160'>stream-first</a> s: (addr stream byte)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: byte
|
||||
<span id="L77" class="LineNr">77 </span><span class="PreProc">sig</span> <a href='309stream.subx.html#L187'>stream-final</a> s: (addr stream byte)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: byte
|
||||
<span id="L78" class="LineNr">78 </span>
|
||||
<span id="L79" class="LineNr">79 </span><span class="muComment">#sig copy-bytes src: (addr byte), dest: (addr byte), n: int</span>
|
||||
<span id="L80" class="LineNr">80 </span><span class="PreProc">sig</span> <a href='312copy.subx.html#L3'>copy-array-object</a> src: (addr array _), dest-ah: (addr handle array _)
|
||||
<span id="L81" class="LineNr">81 </span><span class="PreProc">sig</span> <a href='301array-equal.subx.html#L5'>array-equal?</a> a: (addr array int), b: (addr array int)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: boolean
|
||||
<span id="L82" class="LineNr">82 </span><span class="PreProc">sig</span> <a href='301array-equal.subx.html#L368'>parse-array-of-ints</a> s: (addr array byte), out: (addr handle array int)
|
||||
<span id="L83" class="LineNr">83 </span><span class="PreProc">sig</span> <a href='311decimal-int.subx.html#L623'>parse-array-of-decimal-ints</a> s: (addr array byte), out: (addr handle array int)
|
||||
<span id="L84" class="LineNr">84 </span><span class="PreProc">sig</span> <a href='301array-equal.subx.html#L382'>check-array-equal</a> a: (addr array int), expected: (addr string), msg: (addr string)
|
||||
<span id="L85" class="LineNr">85 </span>
|
||||
<span id="L86" class="LineNr">86 </span><span class="PreProc">sig</span> <a href='314divide.subx.html#L3'>integer-divide</a> a: int, b: int<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: int, _/<span class="Constant">edx</span>: int
|
||||
<span id="L15" class="LineNr">15 </span><span class="muComment"># mouse</span>
|
||||
<span id="L16" class="LineNr">16 </span><span class="PreProc">sig</span> <a href='boot.subx.html#L1200'>read-mouse-event</a><span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: int, _/<span class="Constant">ecx</span>: int
|
||||
<span id="L17" class="LineNr">17 </span>
|
||||
<span id="L18" class="LineNr">18 </span><span class="muComment"># tests</span>
|
||||
<span id="L19" class="LineNr">19 </span><span class="PreProc">sig</span> <a href='104test.subx.html#L5'>count-test-failure</a>
|
||||
<span id="L20" class="LineNr">20 </span><span class="PreProc">sig</span> <a href='104test.subx.html#L17'>num-test-failures</a><span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: int
|
||||
<span id="L21" class="LineNr">21 </span>
|
||||
<span id="L22" class="LineNr">22 </span><span class="PreProc">sig</span> <a href='105string-equal.subx.html#L8'>string-equal?</a> s: (addr array byte), benchmark: (addr array byte)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: boolean
|
||||
<span id="L23" class="LineNr">23 </span><span class="PreProc">sig</span> <a href='105string-equal.subx.html#L50'>string-starts-with?</a> s: (addr array byte), benchmark: (addr array byte)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: boolean
|
||||
<span id="L24" class="LineNr">24 </span><span class="PreProc">sig</span> <a href='105string-equal.subx.html#L213'>check-strings-equal</a> s: (addr array byte), expected: (addr array byte), msg: (addr array byte)
|
||||
<span id="L25" class="LineNr">25 </span>
|
||||
<span id="L26" class="LineNr">26 </span><span class="muComment"># streams</span>
|
||||
<span id="L27" class="LineNr">27 </span><span class="PreProc">sig</span> <a href='106stream.subx.html#L20'>clear-stream</a> f: (addr stream _)
|
||||
<span id="L28" class="LineNr">28 </span><span class="PreProc">sig</span> <a href='106stream.subx.html#L59'>rewind-stream</a> f: (addr stream _)
|
||||
<span id="L29" class="LineNr">29 </span><span class="PreProc">sig</span> <a href='109stream-equal.subx.html#L9'>stream-data-equal?</a> f: (addr stream byte), s: (addr array byte)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: boolean
|
||||
<span id="L30" class="LineNr">30 </span><span class="PreProc">sig</span> <a href='109stream-equal.subx.html#L194'>check-stream-equal</a> f: (addr stream byte), s: (addr array byte), msg: (addr array byte)
|
||||
<span id="L31" class="LineNr">31 </span><span class="PreProc">sig</span> <a href='109stream-equal.subx.html#L230'>next-stream-line-equal?</a> f: (addr stream byte), s: (addr array byte)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: boolean
|
||||
<span id="L32" class="LineNr">32 </span><span class="PreProc">sig</span> <a href='109stream-equal.subx.html#L565'>check-next-stream-line-equal</a> f: (addr stream byte), s: (addr array byte), msg: (addr array byte)
|
||||
<span id="L33" class="LineNr">33 </span><span class="PreProc">sig</span> <a href='108write.subx.html#L11'>write</a> f: (addr stream byte), s: (addr array byte)
|
||||
<span id="L34" class="LineNr">34 </span><span class="PreProc">sig</span> <a href='113write-stream.subx.html#L8'>write-stream</a> f: (addr stream byte), s: (addr stream byte)
|
||||
<span id="L35" class="LineNr">35 </span><span class="PreProc">sig</span> <a href='112read-byte.subx.html#L13'>read-byte</a> s: (addr stream byte)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: byte
|
||||
<span id="L36" class="LineNr">36 </span><span class="PreProc">sig</span> <a href='115write-byte.subx.html#L12'>append-byte</a> f: (addr stream byte), n: int <span class="muComment"># really just a byte, but I want to pass in literal numbers</span>
|
||||
<span id="L37" class="LineNr">37 </span><span class="muComment">#sig to-hex-char in/eax: int -> out/eax: int</span>
|
||||
<span id="L38" class="LineNr">38 </span><span class="PreProc">sig</span> <a href='117write-int-hex.subx.html#L21'>append-byte-hex</a> f: (addr stream byte), n: int <span class="muComment"># really just a byte, but I want to pass in literal numbers</span>
|
||||
<span id="L39" class="LineNr">39 </span><span class="PreProc">sig</span> <a href='117write-int-hex.subx.html#L92'>write-int32-hex</a> f: (addr stream byte), n: int
|
||||
<span id="L40" class="LineNr">40 </span><span class="PreProc">sig</span> <a href='117write-int-hex.subx.html#L123'>write-int32-hex-bits</a> f: (addr stream byte), n: int, bits: int
|
||||
<span id="L41" class="LineNr">41 </span><span class="PreProc">sig</span> <a href='118parse-hex-int.subx.html#L9'>hex-int?</a> in: (addr slice)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: boolean
|
||||
<span id="L42" class="LineNr">42 </span><span class="PreProc">sig</span> <a href='118parse-hex-int.subx.html#L354'>parse-hex-int</a> in: (addr array byte)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: int
|
||||
<span id="L43" class="LineNr">43 </span><span class="PreProc">sig</span> <a href='118parse-hex-int.subx.html#L387'>parse-hex-int-from-slice</a> in: (addr slice)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: int
|
||||
<span id="L44" class="LineNr">44 </span><span class="muComment">#sig parse-hex-int-helper start: (addr byte), end: (addr byte) -> _/eax: int</span>
|
||||
<span id="L45" class="LineNr">45 </span><span class="PreProc">sig</span> <a href='118parse-hex-int.subx.html#L701'>hex-digit?</a> c: byte<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: boolean
|
||||
<span id="L46" class="LineNr">46 </span><span class="muComment">#sig from-hex-char in/eax: byte -> out/eax: nibble</span>
|
||||
<span id="L47" class="LineNr">47 </span><span class="PreProc">sig</span> <a href='311decimal-int.subx.html#L23'>parse-decimal-int</a> in: (addr array byte)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: int
|
||||
<span id="L48" class="LineNr">48 </span><span class="PreProc">sig</span> <a href='311decimal-int.subx.html#L4'>parse-decimal-int-from-slice</a> in: (addr slice)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: int
|
||||
<span id="L49" class="LineNr">49 </span><span class="PreProc">sig</span> <a href='311decimal-int.subx.html#L48'>parse-decimal-int-from-stream</a> in: (addr stream byte)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: int
|
||||
<span id="L50" class="LineNr">50 </span><span class="muComment">#sig parse-decimal-int-helper start: (addr byte), end: (addr byte) -> _/eax: int</span>
|
||||
<span id="L51" class="LineNr">51 </span><span class="PreProc">sig</span> <a href='311decimal-int.subx.html#L312'>decimal-size</a> n: int<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: int
|
||||
<span id="L52" class="LineNr">52 </span><span class="muComment">#sig allocate ad: (addr allocation-descriptor), n: int, out: (addr handle _)</span>
|
||||
<span id="L53" class="LineNr">53 </span><span class="muComment">#sig allocate-raw ad: (addr allocation-descriptor), n: int, out: (addr handle _)</span>
|
||||
<span id="L54" class="LineNr">54 </span><span class="PreProc">sig</span> <a href='120allocate.subx.html#L226'>lookup</a> h: (handle _T)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: (addr _T)
|
||||
<span id="L55" class="LineNr">55 </span><span class="PreProc">sig</span> <a href='120allocate.subx.html#L424'>handle-equal?</a> a: (handle _T), b: (handle _T)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: boolean
|
||||
<span id="L56" class="LineNr">56 </span><span class="PreProc">sig</span> <a href='120allocate.subx.html#L455'>copy-handle</a> src: (handle _T), dest: (addr handle _T)
|
||||
<span id="L57" class="LineNr">57 </span><span class="muComment">#sig allocate-region ad: (addr allocation-descriptor), n: int, out: (addr handle allocation-descriptor)</span>
|
||||
<span id="L58" class="LineNr">58 </span><span class="muComment">#sig allocate-array ad: (addr allocation-descriptor), n: int, out: (addr handle _)</span>
|
||||
<span id="L59" class="LineNr">59 </span><span class="PreProc">sig</span> <a href='120allocate.subx.html#L669'>copy-array</a> ad: (addr allocation-descriptor), src: (addr array _T), out: (addr handle array _T)
|
||||
<span id="L60" class="LineNr">60 </span><span class="muComment">#sig zero-out start: (addr byte), size: int</span>
|
||||
<span id="L61" class="LineNr">61 </span><span class="PreProc">sig</span> <a href='123slice.subx.html#L9'>slice-empty?</a> s: (addr slice)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: boolean
|
||||
<span id="L62" class="LineNr">62 </span><span class="PreProc">sig</span> <a href='123slice.subx.html#L120'>slice-equal?</a> s: (addr slice), p: (addr array byte)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: boolean
|
||||
<span id="L63" class="LineNr">63 </span><span class="PreProc">sig</span> <a href='123slice.subx.html#L487'>slice-starts-with?</a> s: (addr slice), head: (addr array byte)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: boolean
|
||||
<span id="L64" class="LineNr">64 </span><span class="PreProc">sig</span> <a href='123slice.subx.html#L793'>write-slice</a> out: (addr stream byte), s: (addr slice)
|
||||
<span id="L65" class="LineNr">65 </span><span class="muComment"># bad name alert</span>
|
||||
<span id="L66" class="LineNr">66 </span><span class="PreProc">sig</span> <a href='123slice.subx.html#L901'>slice-to-string</a> ad: (addr allocation-descriptor), in: (addr slice), out: (addr handle array byte)
|
||||
<span id="L67" class="LineNr">67 </span><span class="PreProc">sig</span> <a href='126write-int-decimal.subx.html#L8'>write-int32-decimal</a> out: (addr stream byte), n: int
|
||||
<span id="L68" class="LineNr">68 </span><span class="PreProc">sig</span> <a href='126write-int-decimal.subx.html#L299'>decimal-digit?</a> c: grapheme<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: boolean
|
||||
<span id="L69" class="LineNr">69 </span><span class="PreProc">sig</span> <a href='126write-int-decimal.subx.html#L398'>to-decimal-digit</a> in: grapheme<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: int
|
||||
<span id="L70" class="LineNr">70 </span><span class="muComment"># bad name alert</span>
|
||||
<span id="L71" class="LineNr">71 </span><span class="muComment"># next-word really tokenizes</span>
|
||||
<span id="L72" class="LineNr">72 </span><span class="muComment"># next-raw-word really reads whitespace-separated words</span>
|
||||
<span id="L73" class="LineNr">73 </span><span class="PreProc">sig</span> <a href='127next-word.subx.html#L11'>next-word</a> line: (addr stream byte), out: (addr slice) <span class="muComment"># skips '#' comments</span>
|
||||
<span id="L74" class="LineNr">74 </span><span class="PreProc">sig</span> <a href='127next-word.subx.html#L306'>next-raw-word</a> line: (addr stream byte), out: (addr slice) <span class="muComment"># does not skip '#' comments</span>
|
||||
<span id="L75" class="LineNr">75 </span><span class="PreProc">sig</span> <a href='309stream.subx.html#L6'>stream-empty?</a> s: (addr stream _)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: boolean
|
||||
<span id="L76" class="LineNr">76 </span><span class="PreProc">sig</span> <a href='309stream.subx.html#L30'>stream-full?</a> s: (addr stream _)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: boolean
|
||||
<span id="L77" class="LineNr">77 </span><span class="PreProc">sig</span> <a href='310copy-bytes.subx.html#L60'>stream-to-array</a> in: (addr stream _), out: (addr handle array _)
|
||||
<span id="L78" class="LineNr">78 </span><span class="PreProc">sig</span> <a href='310copy-bytes.subx.html#L120'>unquote-stream-to-array</a> in: (addr stream _), out: (addr handle array _)
|
||||
<span id="L79" class="LineNr">79 </span><span class="PreProc">sig</span> <a href='309stream.subx.html#L160'>stream-first</a> s: (addr stream byte)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: byte
|
||||
<span id="L80" class="LineNr">80 </span><span class="PreProc">sig</span> <a href='309stream.subx.html#L187'>stream-final</a> s: (addr stream byte)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: byte
|
||||
<span id="L81" class="LineNr">81 </span>
|
||||
<span id="L82" class="LineNr">82 </span><span class="muComment">#sig copy-bytes src: (addr byte), dest: (addr byte), n: int</span>
|
||||
<span id="L83" class="LineNr">83 </span><span class="PreProc">sig</span> <a href='312copy.subx.html#L3'>copy-array-object</a> src: (addr array _), dest-ah: (addr handle array _)
|
||||
<span id="L84" class="LineNr">84 </span><span class="PreProc">sig</span> <a href='301array-equal.subx.html#L5'>array-equal?</a> a: (addr array int), b: (addr array int)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: boolean
|
||||
<span id="L85" class="LineNr">85 </span><span class="PreProc">sig</span> <a href='301array-equal.subx.html#L368'>parse-array-of-ints</a> s: (addr array byte), out: (addr handle array int)
|
||||
<span id="L86" class="LineNr">86 </span><span class="PreProc">sig</span> <a href='311decimal-int.subx.html#L623'>parse-array-of-decimal-ints</a> s: (addr array byte), out: (addr handle array int)
|
||||
<span id="L87" class="LineNr">87 </span><span class="PreProc">sig</span> <a href='301array-equal.subx.html#L382'>check-array-equal</a> a: (addr array int), expected: (addr string), msg: (addr string)
|
||||
<span id="L88" class="LineNr">88 </span>
|
||||
<span id="L89" class="LineNr">89 </span><span class="PreProc">sig</span> <a href='314divide.subx.html#L3'>integer-divide</a> a: int, b: int<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: int, _/<span class="Constant">edx</span>: int
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,104 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>Mu - ex10.mu</title>
|
||||
<meta name="Generator" content="Vim/8.1">
|
||||
<meta name="plugin-version" content="vim8.1_v1">
|
||||
<meta name="syntax" content="none">
|
||||
<meta name="settings" content="number_lines,use_css,pre_wrap,no_foldcolumn,expand_tabs,line_ids,prevent_copy=">
|
||||
<meta name="colorscheme" content="minimal-light">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-color: #c6c6c6; }
|
||||
body { font-size:12pt; font-family: monospace; color: #000000; background-color: #c6c6c6; }
|
||||
a { color:inherit; }
|
||||
* { font-size:12pt; font-size: 1em; }
|
||||
.PreProc { color: #c000c0; }
|
||||
.Special { color: #ff6060; }
|
||||
.LineNr { }
|
||||
.Constant { color: #008787; }
|
||||
.Delimiter { color: #c000c0; }
|
||||
.muFunction { color: #af5f00; text-decoration: underline; }
|
||||
.muComment { color: #005faf; }
|
||||
-->
|
||||
</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/main/ex10.mu'>https://github.com/akkartik/mu/blob/main/ex10.mu</a>
|
||||
<pre id='vimCodeElement'>
|
||||
<span id="L1" class="LineNr"> 1 </span><span class="muComment"># Demo of mouse, showing deltas in x and y position for every event.</span>
|
||||
<span id="L2" class="LineNr"> 2 </span><span class="muComment">#</span>
|
||||
<span id="L3" class="LineNr"> 3 </span><span class="muComment"># To build a disk image:</span>
|
||||
<span id="L4" class="LineNr"> 4 </span><span class="muComment"># ./translate ex10.mu # emits disk.img</span>
|
||||
<span id="L5" class="LineNr"> 5 </span><span class="muComment"># To run:</span>
|
||||
<span id="L6" class="LineNr"> 6 </span><span class="muComment"># qemu-system-i386 disk.img</span>
|
||||
<span id="L7" class="LineNr"> 7 </span><span class="muComment"># Or:</span>
|
||||
<span id="L8" class="LineNr"> 8 </span><span class="muComment"># bochs -f bochsrc # bochsrc loads disk.img</span>
|
||||
<span id="L9" class="LineNr"> 9 </span><span class="muComment">#</span>
|
||||
<span id="L10" class="LineNr">10 </span><span class="muComment"># Expected output:</span>
|
||||
<span id="L11" class="LineNr">11 </span><span class="muComment"># Values between -256 and +255 as you move the mouse over the window.</span>
|
||||
<span id="L12" class="LineNr">12 </span><span class="muComment"># You might need to click on the window once.</span>
|
||||
<span id="L13" class="LineNr">13 </span>
|
||||
<span id="L14" class="LineNr">14 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex10.mu.html#L14'>main</a></span> <span class="Delimiter">{</span>
|
||||
<span id="L15" class="LineNr">15 </span> <span class="muComment"># repeatedly print out mouse driver results if non-zero</span>
|
||||
<span id="L16" class="LineNr">16 </span> $main:event-loop: <span class="Delimiter">{</span>
|
||||
<span id="L17" class="LineNr">17 </span> <span class="PreProc">var</span> dx/<span class="Constant">eax</span>: int <span class="Special"><-</span> copy <span class="Constant">0</span>
|
||||
<span id="L18" class="LineNr">18 </span> <span class="PreProc">var</span> dy/<span class="Constant">ecx</span>: int <span class="Special"><-</span> copy <span class="Constant">0</span>
|
||||
<span id="L19" class="LineNr">19 </span> dx, dy <span class="Special"><-</span> read-mouse-event
|
||||
<span id="L20" class="LineNr">20 </span> <span class="Delimiter">{</span>
|
||||
<span id="L21" class="LineNr">21 </span> compare dx, <span class="Constant">0</span>
|
||||
<span id="L22" class="LineNr">22 </span> <span class="PreProc">break-if-!=</span>
|
||||
<span id="L23" class="LineNr">23 </span> compare dy, <span class="Constant">0</span>
|
||||
<span id="L24" class="LineNr">24 </span> <span class="PreProc">break-if-!=</span>
|
||||
<span id="L25" class="LineNr">25 </span> <span class="PreProc">loop</span> $main:event-loop
|
||||
<span id="L26" class="LineNr">26 </span> <span class="Delimiter">}</span>
|
||||
<span id="L27" class="LineNr">27 </span> <span class="Delimiter">{</span>
|
||||
<span id="L28" class="LineNr">28 </span> <span class="PreProc">var</span> dummy1/<span class="Constant">eax</span>: int <span class="Special"><-</span> copy <span class="Constant">0</span>
|
||||
<span id="L29" class="LineNr">29 </span> <span class="PreProc">var</span> dummy2/<span class="Constant">ecx</span>: int <span class="Special"><-</span> copy <span class="Constant">0</span>
|
||||
<span id="L30" class="LineNr">30 </span> dummy1, dummy2 <span class="Special"><-</span> <a href='501draw-text.mu.html#L213'>draw-text-wrapping-right-then-down-over-full-screen</a> <span class="Constant">0</span>/screen, <span class="Constant">" "</span>, <span class="Constant">0</span>/x, <span class="Constant">0x10</span>/y, <span class="Constant">0x31</span>/fg, <span class="Constant">0</span>/bg
|
||||
<span id="L31" class="LineNr">31 </span> <span class="Delimiter">}</span>
|
||||
<span id="L32" class="LineNr">32 </span> <span class="Delimiter">{</span>
|
||||
<span id="L33" class="LineNr">33 </span> <span class="PreProc">var</span> dummy/<span class="Constant">ecx</span>: int <span class="Special"><-</span> copy <span class="Constant">0</span>
|
||||
<span id="L34" class="LineNr">34 </span> dx, dummy <span class="Special"><-</span> <a href='501draw-text.mu.html#L321'>draw-int32-decimal-wrapping-right-then-down-over-full-screen</a> <span class="Constant">0</span>/screen, dx, <span class="Constant">0</span>/x, <span class="Constant">0x10</span>/y, <span class="Constant">0x31</span>/fg, <span class="Constant">0</span>/bg
|
||||
<span id="L35" class="LineNr">35 </span> <span class="Delimiter">}</span>
|
||||
<span id="L36" class="LineNr">36 </span> <span class="Delimiter">{</span>
|
||||
<span id="L37" class="LineNr">37 </span> <span class="PreProc">var</span> dummy/<span class="Constant">eax</span>: int <span class="Special"><-</span> copy <span class="Constant">0</span>
|
||||
<span id="L38" class="LineNr">38 </span> dummy, dy <span class="Special"><-</span> <a href='501draw-text.mu.html#L321'>draw-int32-decimal-wrapping-right-then-down-over-full-screen</a> <span class="Constant">0</span>/screen, dy, <span class="Constant">5</span>/x, <span class="Constant">0x10</span>/y, <span class="Constant">0x31</span>/fg, <span class="Constant">0</span>/bg
|
||||
<span id="L39" class="LineNr">39 </span> <span class="Delimiter">}</span>
|
||||
<span id="L40" class="LineNr">40 </span> <span class="PreProc">loop</span>
|
||||
<span id="L41" class="LineNr">41 </span> <span class="Delimiter">}</span>
|
||||
<span id="L42" class="LineNr">42 </span><span class="Delimiter">}</span>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
<!-- vim: set foldmethod=manual : -->
|
|
@ -0,0 +1,113 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>Mu - ex9.mu</title>
|
||||
<meta name="Generator" content="Vim/8.1">
|
||||
<meta name="plugin-version" content="vim8.1_v1">
|
||||
<meta name="syntax" content="none">
|
||||
<meta name="settings" content="number_lines,use_css,pre_wrap,no_foldcolumn,expand_tabs,line_ids,prevent_copy=">
|
||||
<meta name="colorscheme" content="minimal-light">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
pre { white-space: pre-wrap; font-family: monospace; color: #000000; background-color: #c6c6c6; }
|
||||
body { font-size:12pt; font-family: monospace; color: #000000; background-color: #c6c6c6; }
|
||||
a { color:inherit; }
|
||||
* { font-size:12pt; font-size: 1em; }
|
||||
.PreProc { color: #c000c0; }
|
||||
.Special { color: #ff6060; }
|
||||
.LineNr { }
|
||||
.Constant { color: #008787; }
|
||||
.Delimiter { color: #c000c0; }
|
||||
.muFunction { color: #af5f00; text-decoration: underline; }
|
||||
.muComment { color: #005faf; }
|
||||
-->
|
||||
</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/main/ex9.mu'>https://github.com/akkartik/mu/blob/main/ex9.mu</a>
|
||||
<pre id='vimCodeElement'>
|
||||
<span id="L1" class="LineNr"> 1 </span><span class="muComment"># Demo of reading and writing to disk.</span>
|
||||
<span id="L2" class="LineNr"> 2 </span><span class="muComment">#</span>
|
||||
<span id="L3" class="LineNr"> 3 </span><span class="muComment"># Steps for trying it out:</span>
|
||||
<span id="L4" class="LineNr"> 4 </span><span class="muComment"># 1. Translate this example into a disk image disk.img.</span>
|
||||
<span id="L5" class="LineNr"> 5 </span><span class="muComment"># ./translate ex9.mu</span>
|
||||
<span id="L6" class="LineNr"> 6 </span><span class="muComment"># 2. Build a second disk image data.img containing some text.</span>
|
||||
<span id="L7" class="LineNr"> 7 </span><span class="muComment"># dd if=/dev/zero of=data.img count=20160</span>
|
||||
<span id="L8" class="LineNr"> 8 </span><span class="muComment"># echo 'abc def ghi' |dd of=data.img conv=notrunc</span>
|
||||
<span id="L9" class="LineNr"> 9 </span><span class="muComment"># 3. Familiarize yourself with how the data disk looks within xxd:</span>
|
||||
<span id="L10" class="LineNr">10 </span><span class="muComment"># xxd data.img |head</span>
|
||||
<span id="L11" class="LineNr">11 </span><span class="muComment"># 4. Run in an emulator, either Qemu or Bochs.</span>
|
||||
<span id="L12" class="LineNr">12 </span><span class="muComment"># qemu-system-i386 -hda disk.img -hdb data.img</span>
|
||||
<span id="L13" class="LineNr">13 </span><span class="muComment"># bochs -f bochsrc.2disks</span>
|
||||
<span id="L14" class="LineNr">14 </span><span class="muComment"># 5. Exit the emulator.</span>
|
||||
<span id="L15" class="LineNr">15 </span><span class="muComment"># 6. Notice that the data disk now contains the word count of the original text.</span>
|
||||
<span id="L16" class="LineNr">16 </span><span class="muComment"># xxd data.img |head</span>
|
||||
<span id="L17" class="LineNr">17 </span>
|
||||
<span id="L18" class="LineNr">18 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex9.mu.html#L18'>main</a></span> <span class="Delimiter">{</span>
|
||||
<span id="L19" class="LineNr">19 </span> <span class="PreProc">var</span> text-storage: (stream byte <span class="Constant">0x200</span>)
|
||||
<span id="L20" class="LineNr">20 </span> <span class="PreProc">var</span> text/<span class="Constant">esi</span>: (addr stream byte) <span class="Special"><-</span> address text-storage
|
||||
<span id="L21" class="LineNr">21 </span> load-first-sector-from-primary-bus-secondary-drive text
|
||||
<span id="L22" class="LineNr">22 </span>
|
||||
<span id="L23" class="LineNr">23 </span> <span class="PreProc">var</span> <a href='ex9.mu.html#L31'>word-count</a>/<span class="Constant">eax</span>: int <span class="Special"><-</span> <a href='ex9.mu.html#L31'>word-count</a> text
|
||||
<span id="L24" class="LineNr">24 </span>
|
||||
<span id="L25" class="LineNr">25 </span> <span class="PreProc">var</span> result-storage: (stream byte <span class="Constant">0x10</span>)
|
||||
<span id="L26" class="LineNr">26 </span> <span class="PreProc">var</span> result/<span class="Constant">edi</span>: (addr stream byte) <span class="Special"><-</span> address result-storage
|
||||
<span id="L27" class="LineNr">27 </span> <a href='126write-int-decimal.subx.html#L8'>write-int32-decimal</a> result, <a href='ex9.mu.html#L31'>word-count</a>
|
||||
<span id="L28" class="LineNr">28 </span> store-first-sector-to-primary-bus-secondary-drive result
|
||||
<span id="L29" class="LineNr">29 </span><span class="Delimiter">}</span>
|
||||
<span id="L30" class="LineNr">30 </span>
|
||||
<span id="L31" class="LineNr">31 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='ex9.mu.html#L31'>word-count</a></span> in: (addr stream byte)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span>
|
||||
<span id="L32" class="LineNr">32 </span> <span class="PreProc">var</span> result/<span class="Constant">edi</span>: int <span class="Special"><-</span> copy <span class="Constant">0</span>
|
||||
<span id="L33" class="LineNr">33 </span> <span class="Delimiter">{</span>
|
||||
<span id="L34" class="LineNr">34 </span> <span class="PreProc">var</span> done?/<span class="Constant">eax</span>: boolean <span class="Special"><-</span> <a href='309stream.subx.html#L6'>stream-empty?</a> in
|
||||
<span id="L35" class="LineNr">35 </span> compare done?, <span class="Constant">0</span>/false
|
||||
<span id="L36" class="LineNr">36 </span> <span class="PreProc">break-if-!=</span>
|
||||
<span id="L37" class="LineNr">37 </span> <span class="PreProc">var</span> g/<span class="Constant">eax</span>: grapheme <span class="Special"><-</span> <a href='403unicode.mu.html#L92'>read-grapheme</a> in
|
||||
<span id="L38" class="LineNr">38 </span> <span class="Delimiter">{</span>
|
||||
<span id="L39" class="LineNr">39 </span> compare g, <span class="Constant">0x20</span>/space
|
||||
<span id="L40" class="LineNr">40 </span> <span class="PreProc">break-if-!=</span>
|
||||
<span id="L41" class="LineNr">41 </span> result <span class="Special"><-</span> increment
|
||||
<span id="L42" class="LineNr">42 </span> <span class="Delimiter">}</span>
|
||||
<span id="L43" class="LineNr">43 </span> <span class="Delimiter">{</span>
|
||||
<span id="L44" class="LineNr">44 </span> compare g, <span class="Constant">0xa</span>/newline
|
||||
<span id="L45" class="LineNr">45 </span> <span class="PreProc">break-if-!=</span>
|
||||
<span id="L46" class="LineNr">46 </span> result <span class="Special"><-</span> increment
|
||||
<span id="L47" class="LineNr">47 </span> <span class="Delimiter">}</span>
|
||||
<span id="L48" class="LineNr">48 </span> <span class="PreProc">loop</span>
|
||||
<span id="L49" class="LineNr">49 </span> <span class="Delimiter">}</span>
|
||||
<span id="L50" class="LineNr">50 </span> <span class="PreProc">return</span> result
|
||||
<span id="L51" class="LineNr">51 </span><span class="Delimiter">}</span>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
<!-- vim: set foldmethod=manual : -->
|
|
@ -38,8 +38,8 @@ convert_html() {
|
|||
sed -i -e 's/┈/╌/g' -e 's/┊/╎/g' $1.html
|
||||
}
|
||||
|
||||
ctags -x [0-9]*.subx [0-9]*.mu > /tmp/tags
|
||||
for f in [0-9]*.subx [0-9]*.mu
|
||||
ctags -x boot.subx [0-9]*.subx [0-9]*.mu > /tmp/tags
|
||||
for f in boot.subx [0-9]*.subx [0-9]*.mu
|
||||
do
|
||||
test $# -gt 0 && test $1 != $f && continue
|
||||
process $f
|
||||
|
@ -48,6 +48,7 @@ done
|
|||
for f in [^0-9]*.subx [^0-9]*.mu
|
||||
do
|
||||
test $# -gt 0 && test $1 != $f && continue
|
||||
test $f = "boot.subx" && continue
|
||||
ctags -x [0-9]*.subx [0-9]*.mu $f > /tmp/tags
|
||||
process $f
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue