diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-03-31 00:12:37 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-03-31 00:12:37 -0700 |
commit | dfb4a6f9ce1f53db6e90c0276ad92bfe076b25e4 (patch) | |
tree | ff616f4997adf9895f0b66cd89bbf8b00036da64 /html | |
parent | 9bc58ed8029d4889ed4a360926a61cf818334535 (diff) | |
download | mu-dfb4a6f9ce1f53db6e90c0276ad92bfe076b25e4.tar.gz |
6178
Diffstat (limited to 'html')
-rw-r--r-- | html/054string-equal.subx.html | 2 | ||||
-rw-r--r-- | html/067parse-hex.subx.html | 2 | ||||
-rw-r--r-- | html/069allocate.subx.html | 34 | ||||
-rw-r--r-- | html/apps/ex13.subx.html | 2 |
4 files changed, 36 insertions, 4 deletions
diff --git a/html/054string-equal.subx.html b/html/054string-equal.subx.html index 49dc86ee..87480b2a 100644 --- a/html/054string-equal.subx.html +++ b/html/054string-equal.subx.html @@ -101,7 +101,7 @@ if ('onhashchange' in window) { <span id="L39" class="LineNr"> 39 </span><span class="Constant">$string-equal?:contents</span>: <span id="L40" class="LineNr"> 40 </span> <span class="subxComment"># string-starts-with?(s, benchmark)</span> <span id="L41" class="LineNr"> 41 </span> <span class="subxS2Comment"># . . push args</span> -<span id="L42" class="LineNr"> 42 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebp+0xc)</span> +<span id="L42" class="LineNr"> 42 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebp+12)</span> <span id="L43" class="LineNr"> 43 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebp+8)</span> <span id="L44" class="LineNr"> 44 </span> <span class="subxS2Comment"># . . call</span> <span id="L45" class="LineNr"> 45 </span> e8/call <a href='054string-equal.subx.html#L58'>string-starts-with?</a>/disp32 diff --git a/html/067parse-hex.subx.html b/html/067parse-hex.subx.html index 7494f8b9..371ebaca 100644 --- a/html/067parse-hex.subx.html +++ b/html/067parse-hex.subx.html @@ -486,7 +486,7 @@ if ('onhashchange' in window) { <span id="L426" class="LineNr">426 </span> <span class="subxComment"># var curr/ecx: (addr byte) = start</span> <span id="L427" class="LineNr">427 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ebp+8) to ecx</span> <span id="L428" class="LineNr">428 </span> <span class="subxComment"># edx = max</span> -<span id="L429" class="LineNr">429 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ebp+0xc) to edx</span> +<span id="L429" class="LineNr">429 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ebp+12) to edx</span> <span id="L430" class="LineNr">430 </span> <span class="subxComment"># var result/ebx: int = 0</span> <span id="L431" class="LineNr">431 </span> 31/xor 3/mod/direct 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># clear ebx</span> <span id="L432" class="LineNr">432 </span> <span class="subxComment"># var negate?/esi: boolean = false</span> diff --git a/html/069allocate.subx.html b/html/069allocate.subx.html index d91325d3..21ef578c 100644 --- a/html/069allocate.subx.html +++ b/html/069allocate.subx.html @@ -295,7 +295,39 @@ if ('onhashchange' in window) { <span id="L234" class="LineNr">234 </span> cd/syscall 0x80/imm8 <span id="L235" class="LineNr">235 </span> <span class="subxComment"># never gets here</span> <span id="L236" class="LineNr">236 </span> -<span id="L237" class="LineNr">237 </span><span class="subxS2Comment"># . . vim:nowrap:textwidth=0</span> +<span id="L237" class="LineNr">237 </span><span class="subxComment"># Claim the next 'n+4' bytes of memory and initialize the first 4 to n.</span> +<span id="L238" class="LineNr">238 </span><span class="subxComment"># Abort if there isn't enough memory in 'ad'.</span> +<span id="L239" class="LineNr">239 </span><span class="subxFunction">allocate-array</span>: <span class="subxComment"># ad: (addr allocation-descriptor), n: int -> result/eax: (addr _)</span> +<span id="L240" class="LineNr">240 </span> <span class="subxS1Comment"># . prologue</span> +<span id="L241" class="LineNr">241 </span> 55/push-ebp +<span id="L242" class="LineNr">242 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span> +<span id="L243" class="LineNr">243 </span> <span class="subxS1Comment"># . save registers</span> +<span id="L244" class="LineNr">244 </span> 51/push-ecx +<span id="L245" class="LineNr">245 </span> 52/push-edx +<span id="L246" class="LineNr">246 </span> <span class="subxComment"># ecx = n</span> +<span id="L247" class="LineNr">247 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ebp+12) to ecx</span> +<span id="L248" class="LineNr">248 </span> <span class="subxComment"># var size/edx: int = n+4</span> +<span id="L249" class="LineNr">249 </span> 8d/copy-address 1/mod/*+disp8 1/rm32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy ecx+4 to edx</span> +<span id="L250" class="LineNr">250 </span> <span class="subxComment"># result = allocate(ad, size)</span> +<span id="L251" class="LineNr">251 </span> <span class="subxS2Comment"># . . push args</span> +<span id="L252" class="LineNr">252 </span> 52/push-edx +<span id="L253" class="LineNr">253 </span> ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># push *(ebp+8)</span> +<span id="L254" class="LineNr">254 </span> <span class="subxS2Comment"># . . call</span> +<span id="L255" class="LineNr">255 </span> e8/call <a href='069allocate.subx.html#L59'>allocate</a>/disp32 +<span id="L256" class="LineNr">256 </span> <span class="subxS2Comment"># . . discard args</span> +<span id="L257" class="LineNr">257 </span> 81 0/subop/add 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 8/imm32 <span class="subxComment"># add to esp</span> +<span id="L258" class="LineNr">258 </span> <span class="subxComment"># *result = n</span> +<span id="L259" class="LineNr">259 </span> 89/copy 0/mod/indirect 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 1/r32/ecx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ecx to *eax</span> +<span id="L260" class="LineNr">260 </span><span class="Constant">$allocate-array:end</span>: +<span id="L261" class="LineNr">261 </span> <span class="subxS1Comment"># . restore registers</span> +<span id="L262" class="LineNr">262 </span> 5a/pop-to-edx +<span id="L263" class="LineNr">263 </span> 59/pop-to-ecx +<span id="L264" class="LineNr">264 </span> <span class="subxS1Comment"># . epilogue</span> +<span id="L265" class="LineNr">265 </span> 89/copy 3/mod/direct 4/rm32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 5/r32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy ebp to esp</span> +<span id="L266" class="LineNr">266 </span> 5d/pop-to-ebp +<span id="L267" class="LineNr">267 </span> c3/return +<span id="L268" class="LineNr">268 </span> +<span id="L269" class="LineNr">269 </span><span class="subxS2Comment"># . . vim:nowrap:textwidth=0</span> </pre> </body> </html> diff --git a/html/apps/ex13.subx.html b/html/apps/ex13.subx.html index d85c5166..883d1532 100644 --- a/html/apps/ex13.subx.html +++ b/html/apps/ex13.subx.html @@ -74,7 +74,7 @@ if ('onhashchange' in window) { <span id="L16" class="LineNr">16 </span> b8/copy-to-eax 3/imm32 <span id="L17" class="LineNr">17 </span> 3d/compare-eax-and 3/imm32 <span id="L18" class="LineNr">18 </span> 0f 94/set-if-= 3/mod/direct 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># set ebx to ZF</span> -<span id="L19" class="LineNr">19 </span> 81 4/subop/and 3/mod/direct 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0xff/imm32 <span class="subxComment"># AND eax with 0xff</span> +<span id="L19" class="LineNr">19 </span> 81 4/subop/and 3/mod/direct 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0xff/imm32 <span class="subxComment"># AND with eax</span> <span id="L20" class="LineNr">20 </span> <span id="L21" class="LineNr">21 </span><span class="Constant">$exit</span>: <span id="L22" class="LineNr">22 </span> <span class="subxComment"># exit(ebx)</span> |