diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-01-03 01:36:34 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-01-03 01:36:34 -0800 |
commit | 7e7a8a6eaeb4c22acb94aaca87a7b15c180ca077 (patch) | |
tree | 405503a31b48f5c5e13f103efc5762e57b290625 /html/072slice.subx.html | |
parent | c9bda4d13ea33873dd5bce1eef0434cb11763d19 (diff) | |
download | mu-7e7a8a6eaeb4c22acb94aaca87a7b15c180ca077.tar.gz |
5876 - address -> addr
Diffstat (limited to 'html/072slice.subx.html')
-rw-r--r-- | html/072slice.subx.html | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/html/072slice.subx.html b/html/072slice.subx.html index 6a525e2e..8176b4d7 100644 --- a/html/072slice.subx.html +++ b/html/072slice.subx.html @@ -67,7 +67,7 @@ if ('onhashchange' in window) { <span id="L6" class="LineNr"> 6 </span><span class="subxS1Comment"># . op subop mod rm32 base index scale r32</span> <span id="L7" class="LineNr"> 7 </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="L8" class="LineNr"> 8 </span> -<span id="L9" class="LineNr"> 9 </span><span class="subxFunction">slice-empty?</span>: <span class="subxComment"># s : (address slice) -> eax : boolean</span> +<span id="L9" class="LineNr"> 9 </span><span class="subxFunction">slice-empty?</span>: <span class="subxComment"># s : (addr slice) -> eax : boolean</span> <span id="L10" class="LineNr"> 10 </span> <span class="subxS1Comment"># . prologue</span> <span id="L11" class="LineNr"> 11 </span> 55/push-ebp <span id="L12" class="LineNr"> 12 </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> @@ -149,7 +149,7 @@ if ('onhashchange' in window) { <span id="L88" class="LineNr"> 88 </span> 5d/pop-to-ebp <span id="L89" class="LineNr"> 89 </span> c3/return <span id="L90" class="LineNr"> 90 </span> -<span id="L91" class="LineNr"> 91 </span><span class="subxFunction">slice-equal?</span>: <span class="subxComment"># s : (address slice), p : (address array byte) -> eax : boolean</span> +<span id="L91" class="LineNr"> 91 </span><span class="subxFunction">slice-equal?</span>: <span class="subxComment"># s : (addr slice), p : (addr array byte) -> eax : boolean</span> <span id="L92" class="LineNr"> 92 </span> <span class="subxComment"># pseudocode:</span> <span id="L93" class="LineNr"> 93 </span> <span class="subxComment"># if (p == 0) return (s == 0)</span> <span id="L94" class="LineNr"> 94 </span> <span class="subxComment"># currs = s->start</span> @@ -179,9 +179,9 @@ if ('onhashchange' in window) { <span id="L118" class="LineNr"> 118 </span> 56/push-esi <span id="L119" class="LineNr"> 119 </span> <span class="subxComment"># esi = s</span> <span id="L120" class="LineNr"> 120 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 6/r32/esi 8/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ebp+8) to esi</span> -<span id="L121" class="LineNr"> 121 </span> <span class="subxComment"># var currs/edx : (address byte) = s->start</span> +<span id="L121" class="LineNr"> 121 </span> <span class="subxComment"># var currs/edx : (addr byte) = s->start</span> <span id="L122" class="LineNr"> 122 </span> 8b/copy 0/mod/indirect 6/rm32/esi <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 *esi to edx</span> -<span id="L123" class="LineNr"> 123 </span> <span class="subxComment"># var maxs/esi : (address byte) = s->end</span> +<span id="L123" class="LineNr"> 123 </span> <span class="subxComment"># var maxs/esi : (addr byte) = s->end</span> <span id="L124" class="LineNr"> 124 </span> 8b/copy 1/mod/*+disp8 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 6/r32/esi 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(esi+4) to esi</span> <span id="L125" class="LineNr"> 125 </span> <span class="subxComment"># var slen/eax : int = maxs - currs</span> <span id="L126" class="LineNr"> 126 </span> 89/copy 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 6/r32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esi to eax</span> @@ -200,7 +200,7 @@ if ('onhashchange' in window) { <span id="L139" class="LineNr"> 139 </span> <span class="subxComment"># if (slen != p->length) return false</span> <span id="L140" class="LineNr"> 140 </span> 39/compare 0/mod/indirect 3/rm32/ebx <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># compare *ebx and eax</span> <span id="L141" class="LineNr"> 141 </span> 75/jump-if-not-equal $slice-equal?:false/disp8 -<span id="L142" class="LineNr"> 142 </span> <span class="subxComment"># var currp/ebx : (address byte) = p->data</span> +<span id="L142" class="LineNr"> 142 </span> <span class="subxComment"># var currp/ebx : (addr byte) = p->data</span> <span id="L143" class="LineNr"> 143 </span> 81 0/subop/add 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> 4/imm32 <span class="subxComment"># add to ebx</span> <span id="L144" class="LineNr"> 144 </span> <span class="subxComment"># var c1/eax : byte = 0</span> <span id="L145" class="LineNr"> 145 </span> 31/xor 3/mod/direct 0/rm32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 0/r32/eax <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># clear eax</span> @@ -516,7 +516,7 @@ if ('onhashchange' in window) { <span id="L455" class="LineNr"> 455 </span> 5d/pop-to-ebp <span id="L456" class="LineNr"> 456 </span> c3/return <span id="L457" class="LineNr"> 457 </span> -<span id="L458" class="LineNr"> 458 </span><span class="subxFunction">slice-starts-with?</span>: <span class="subxComment"># s : (address slice), head : (address array byte) -> eax : boolean</span> +<span id="L458" class="LineNr"> 458 </span><span class="subxFunction">slice-starts-with?</span>: <span class="subxComment"># s : (addr slice), head : (addr array byte) -> eax : boolean</span> <span id="L459" class="LineNr"> 459 </span> <span class="subxComment"># pseudocode</span> <span id="L460" class="LineNr"> 460 </span> <span class="subxComment"># lenh = head->length</span> <span id="L461" class="LineNr"> 461 </span> <span class="subxComment"># if (lenh > s->end - s->start) return false</span> @@ -559,9 +559,9 @@ if ('onhashchange' in window) { <span id="L498" class="LineNr"> 498 </span> <span class="subxComment"># if (lenh > lens) return false</span> <span id="L499" class="LineNr"> 499 </span> 39/compare 3/mod/direct 2/rm32/edx <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"># compare edx with ecx</span> <span id="L500" class="LineNr"> 500 </span> 7f/jump-if-greater $slice-starts-with?:false/disp8 -<span id="L501" class="LineNr"> 501 </span> <span class="subxComment"># var currs/esi : (address byte) = s->start</span> +<span id="L501" class="LineNr"> 501 </span> <span class="subxComment"># var currs/esi : (addr byte) = s->start</span> <span id="L502" class="LineNr"> 502 </span> 8b/subtract 0/mod/indirect 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 6/r32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy *esi to esi</span> -<span id="L503" class="LineNr"> 503 </span> <span class="subxComment"># var currh/edi : (address byte) = head->data</span> +<span id="L503" class="LineNr"> 503 </span> <span class="subxComment"># var currh/edi : (addr byte) = head->data</span> <span id="L504" class="LineNr"> 504 </span> 81 0/subop/add 3/mod/direct 7/rm32/edi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/imm32 <span class="subxComment"># add to edi</span> <span id="L505" class="LineNr"> 505 </span> <span class="subxComment"># var i/ecx : int = 0</span> <span id="L506" class="LineNr"> 506 </span> 31/xor 3/mod/direct 1/rm32/ecx <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"># clear ecx</span> @@ -822,7 +822,7 @@ if ('onhashchange' in window) { <span id="L761" class="LineNr"> 761 </span> <span id="L762" class="LineNr"> 762 </span><span class="subxComment"># write a slice to a stream</span> <span id="L763" class="LineNr"> 763 </span><span class="subxComment"># abort if the stream doesn't have enough space</span> -<span id="L764" class="LineNr"> 764 </span><span class="subxFunction">write-slice</span>: <span class="subxComment"># out : (address stream byte), s : (address slice)</span> +<span id="L764" class="LineNr"> 764 </span><span class="subxFunction">write-slice</span>: <span class="subxComment"># out : (addr stream byte), s : (addr slice)</span> <span id="L765" class="LineNr"> 765 </span> <span class="subxS1Comment"># . prologue</span> <span id="L766" class="LineNr"> 766 </span> 55/push-ebp <span id="L767" class="LineNr"> 767 </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> @@ -835,9 +835,9 @@ if ('onhashchange' in window) { <span id="L774" class="LineNr"> 774 </span> 57/push-edi <span id="L775" class="LineNr"> 775 </span> <span class="subxComment"># esi = s</span> <span id="L776" class="LineNr"> 776 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 6/r32/esi 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ebp+12) to esi</span> -<span id="L777" class="LineNr"> 777 </span> <span class="subxComment"># var curr/ecx : (address byte) = s->start</span> +<span id="L777" class="LineNr"> 777 </span> <span class="subxComment"># var curr/ecx : (addr byte) = s->start</span> <span id="L778" class="LineNr"> 778 </span> 8b/copy 0/mod/indirect 6/rm32/esi <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 *esi to ecx</span> -<span id="L779" class="LineNr"> 779 </span> <span class="subxComment"># var max/esi : (address byte) = s->end</span> +<span id="L779" class="LineNr"> 779 </span> <span class="subxComment"># var max/esi : (addr byte) = s->end</span> <span id="L780" class="LineNr"> 780 </span> 8b/copy 1/mod/*+disp8 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 6/r32/esi 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(esi+4) to esi</span> <span id="L781" class="LineNr"> 781 </span> <span class="subxComment"># edi = out</span> <span id="L782" class="LineNr"> 782 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <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> @@ -938,7 +938,7 @@ if ('onhashchange' in window) { <span id="L877" class="LineNr"> 877 </span> c3/return <span id="L878" class="LineNr"> 878 </span> <span id="L879" class="LineNr"> 879 </span><span class="subxComment"># write a slice to a buffered-file</span> -<span id="L880" class="LineNr"> 880 </span><span class="subxFunction">write-slice-buffered</span>: <span class="subxComment"># out : (address buffered-file), s : (address slice)</span> +<span id="L880" class="LineNr"> 880 </span><span class="subxFunction">write-slice-buffered</span>: <span class="subxComment"># out : (addr buffered-file), s : (addr slice)</span> <span id="L881" class="LineNr"> 881 </span> <span class="subxS1Comment"># . prologue</span> <span id="L882" class="LineNr"> 882 </span> 55/push-ebp <span id="L883" class="LineNr"> 883 </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> @@ -951,9 +951,9 @@ if ('onhashchange' in window) { <span id="L890" class="LineNr"> 890 </span> 57/push-edi <span id="L891" class="LineNr"> 891 </span> <span class="subxComment"># esi = s</span> <span id="L892" class="LineNr"> 892 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 6/r32/esi 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ebp+12) to esi</span> -<span id="L893" class="LineNr"> 893 </span> <span class="subxComment"># var curr/ecx : (address byte) = s->start</span> +<span id="L893" class="LineNr"> 893 </span> <span class="subxComment"># var curr/ecx : (addr byte) = s->start</span> <span id="L894" class="LineNr"> 894 </span> 8b/copy 0/mod/indirect 6/rm32/esi <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 *esi to ecx</span> -<span id="L895" class="LineNr"> 895 </span> <span class="subxComment"># var max/esi : (address byte) = s->end</span> +<span id="L895" class="LineNr"> 895 </span> <span class="subxComment"># var max/esi : (addr byte) = s->end</span> <span id="L896" class="LineNr"> 896 </span> 8b/copy 1/mod/*+disp8 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 6/r32/esi 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(esi+4) to esi</span> <span id="L897" class="LineNr"> 897 </span> <span class="subxComment"># edi = out</span> <span id="L898" class="LineNr"> 898 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <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> @@ -1073,7 +1073,7 @@ if ('onhashchange' in window) { <span id="L1012" class="LineNr">1012 </span> c3/return <span id="L1013" class="LineNr">1013 </span> <span id="L1014" class="LineNr">1014 </span><span class="subxComment"># copy a slice into a new (dynamically allocated) string</span> -<span id="L1015" class="LineNr">1015 </span><span class="subxFunction">slice-to-string</span>: <span class="subxComment"># ad : (address allocation-descriptor), in : (address slice) -> out/eax : (address array byte)</span> +<span id="L1015" class="LineNr">1015 </span><span class="subxFunction">slice-to-string</span>: <span class="subxComment"># ad : (addr allocation-descriptor), in : (addr slice) -> out/eax : (addr array byte)</span> <span id="L1016" class="LineNr">1016 </span> <span class="subxS1Comment"># . prologue</span> <span id="L1017" class="LineNr">1017 </span> 55/push-ebp <span id="L1018" class="LineNr">1018 </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> @@ -1084,9 +1084,9 @@ if ('onhashchange' in window) { <span id="L1023" class="LineNr">1023 </span> 56/push-esi <span id="L1024" class="LineNr">1024 </span> <span class="subxComment"># esi = in</span> <span id="L1025" class="LineNr">1025 </span> 8b/copy 1/mod/*+disp8 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 6/r32/esi 0xc/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(ebp+12) to esi</span> -<span id="L1026" class="LineNr">1026 </span> <span class="subxComment"># var curr/edx : (address byte) = in->start</span> +<span id="L1026" class="LineNr">1026 </span> <span class="subxComment"># var curr/edx : (addr byte) = in->start</span> <span id="L1027" class="LineNr">1027 </span> 8b/copy 0/mod/indirect 6/rm32/esi <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 *esi to edx</span> -<span id="L1028" class="LineNr">1028 </span> <span class="subxComment"># var max/ebx : (address byte) = in->end</span> +<span id="L1028" class="LineNr">1028 </span> <span class="subxComment"># var max/ebx : (addr byte) = in->end</span> <span id="L1029" class="LineNr">1029 </span> 8b/copy 1/mod/*+disp8 6/rm32/esi <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 3/r32/ebx 4/disp8 <span class="Normal"> . </span> <span class="subxComment"># copy *(esi+4) to ebx</span> <span id="L1030" class="LineNr">1030 </span> <span class="subxComment"># var size/ecx : int = max - curr + 4 # total size of output string (including the initial length)</span> <span id="L1031" class="LineNr">1031 </span> 89/copy 3/mod/direct 1/rm32/ecx <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"># copy ebx to ecx</span> |