diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-01-27 00:39:46 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-01-27 00:39:46 -0800 |
commit | 2104d1a75b76dbffc0b15a96c98d94e7a16594e8 (patch) | |
tree | 2a839b86e76431a9bbe4bf155f7411171a26d7f8 /html/075print-int-decimal.subx.html | |
parent | 71eb22a5bf94f5fa0a3c95212450e3c6a1a6a990 (diff) | |
download | mu-2104d1a75b76dbffc0b15a96c98d94e7a16594e8.tar.gz |
5925
Diffstat (limited to 'html/075print-int-decimal.subx.html')
-rw-r--r-- | html/075print-int-decimal.subx.html | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/html/075print-int-decimal.subx.html b/html/075print-int-decimal.subx.html index bf35a3be..75271d9a 100644 --- a/html/075print-int-decimal.subx.html +++ b/html/075print-int-decimal.subx.html @@ -66,7 +66,7 @@ if ('onhashchange' in window) { <span id="L5" class="LineNr"> 5 </span><span class="subxS1Comment"># . op subop mod rm32 base index scale r32</span> <span id="L6" class="LineNr"> 6 </span><span class="subxS1Comment"># . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes</span> <span id="L7" class="LineNr"> 7 </span> -<span id="L8" class="LineNr"> 8 </span><span class="subxFunction">print-int32-decimal</span>: <span class="subxComment"># out : (addr stream byte), n : int32</span> +<span id="L8" class="LineNr"> 8 </span><span class="subxFunction">print-int32-decimal</span>: <span class="subxComment"># out: (addr stream byte), n: int32</span> <span id="L9" class="LineNr"> 9 </span> <span class="subxComment"># works by generating characters from lowest to highest and pushing them</span> <span id="L10" class="LineNr"> 10 </span> <span class="subxComment"># to the stack, before popping them one by one into the stream</span> <span id="L11" class="LineNr"> 11 </span> <span class="subxComment">#</span> @@ -109,7 +109,7 @@ if ('onhashchange' in window) { <span id="L48" class="LineNr"> 48 </span> b9/copy-to-ecx 0xa/imm32 <span id="L49" class="LineNr"> 49 </span> <span class="subxComment"># push sentinel</span> <span id="L50" class="LineNr"> 50 </span> 68/push 0/imm32/sentinel -<span id="L51" class="LineNr"> 51 </span> <span class="subxComment"># var eax : int = abs(n)</span> +<span id="L51" class="LineNr"> 51 </span> <span class="subxComment"># var eax: int = abs(n)</span> <span id="L52" class="LineNr"> 52 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ebp+12) to eax</span> <span id="L53" class="LineNr"> 53 </span> 3d/compare-eax-with 0/imm32 <span id="L54" class="LineNr"> 54 </span> 7d/jump-if->= $print-int32-decimal:read-loop/disp8 @@ -135,11 +135,11 @@ if ('onhashchange' in window) { <span id="L74" class="LineNr"> 74 </span><span class="Constant">$print-int32-decimal:<a href='057write.subx.html#L24'>write</a></span>: <span id="L75" class="LineNr"> 75 </span> <span class="subxComment"># edi = out</span> <span id="L76" class="LineNr"> 76 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 7/r32/edi 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ebp+8) to edi</span> -<span id="L77" class="LineNr"> 77 </span> <span class="subxComment"># var w/edx : int = out->write</span> +<span id="L77" class="LineNr"> 77 </span> <span class="subxComment"># var w/edx: int = out->write</span> <span id="L78" class="LineNr"> 78 </span> 8b/copy 0/mod/indirect 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 2/r32/edx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy *edi to edx</span> -<span id="L79" class="LineNr"> 79 </span> <span class="subxComment"># var curr/ecx : (addr byte) = &out->data[out->write]</span> +<span id="L79" class="LineNr"> 79 </span> <span class="subxComment"># var curr/ecx: (addr byte) = &out->data[out->write]</span> <span id="L80" class="LineNr"> 80 </span> 8d/copy-address 1/mod/*+disp8 4/rm32/sib 7/base/edi 2/index/edx <span class="Normal"> . </span> 1/r32/ecx 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy ebx+edx+12 to ecx</span> -<span id="L81" class="LineNr"> 81 </span> <span class="subxComment"># var max/ebx : (addr byte) = &out->data[out->length]</span> +<span id="L81" class="LineNr"> 81 </span> <span class="subxComment"># var max/ebx: (addr byte) = &out->data[out->length]</span> <span id="L82" class="LineNr"> 82 </span> 8b/copy 1/mod/*+disp8 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/ebx 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(edi+8) to ebx</span> <span id="L83" class="LineNr"> 83 </span> 8d/copy-address 1/mod/*+disp8 4/rm32/sib 7/base/edi 3/index/ebx <span class="Normal"> . </span> 3/r32/ebx 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy edi+ebx+12 to ebx</span> <span id="L84" class="LineNr"> 84 </span><span class="Constant">$print-int32-decimal:write-loop</span>: @@ -340,7 +340,7 @@ if ('onhashchange' in window) { <span id="L304" class="LineNr">304 </span> <span class="subxS1Comment"># . end</span> <span id="L305" class="LineNr">305 </span> c3/return <span id="L306" class="LineNr">306 </span> -<span id="L307" class="LineNr">307 </span><span class="subxFunction">is-decimal-digit?</span>: <span class="subxComment"># c : byte -> eax : boolean</span> +<span id="L307" class="LineNr">307 </span><span class="subxFunction">is-decimal-digit?</span>: <span class="subxComment"># c: byte -> eax: boolean</span> <span id="L308" class="LineNr">308 </span> <span class="subxS1Comment"># . prologue</span> <span id="L309" class="LineNr">309 </span> 55/push-ebp <span id="L310" class="LineNr">310 </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> |