about summary refs log tree commit diff stats
path: root/html/subx/050_write.subx.html
diff options
context:
space:
mode:
Diffstat (limited to 'html/subx/050_write.subx.html')
-rw-r--r--html/subx/050_write.subx.html35
1 files changed, 23 insertions, 12 deletions
diff --git a/html/subx/050_write.subx.html b/html/subx/050_write.subx.html
index 78d9cf0c..e5d0f459 100644
--- a/html/subx/050_write.subx.html
+++ b/html/subx/050_write.subx.html
@@ -91,18 +91,29 @@ if ('onhashchange' in window) {
 <span id="L32" class="LineNr">32 </span>    <span class="subxS1Comment"># . syscall</span>
 <span id="L33" class="LineNr">33 </span>    b8/copy-to-EAX  4/imm32/write
 <span id="L34" class="LineNr">34 </span>    cd/syscall  0x80/imm8
-<span id="L35" class="LineNr">35 </span><span class="Constant">$_write:end</span>:
-<span id="L36" class="LineNr">36 </span>    <span class="subxS1Comment"># . restore registers</span>
-<span id="L37" class="LineNr">37 </span>    5b/pop-to-EBX
-<span id="L38" class="LineNr">38 </span>    5a/pop-to-EDX
-<span id="L39" class="LineNr">39 </span>    59/pop-to-ECX
-<span id="L40" class="LineNr">40 </span>    58/pop-to-EAX
-<span id="L41" class="LineNr">41 </span>    <span class="subxS1Comment"># . epilog</span>
-<span id="L42" class="LineNr">42 </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="L43" class="LineNr">43 </span>    5d/pop-to-EBP
-<span id="L44" class="LineNr">44 </span>    c3/return
-<span id="L45" class="LineNr">45 </span>
-<span id="L46" class="LineNr">46 </span><span class="subxS2Comment"># . . vim&#0058;nowrap:textwidth=0</span>
+<span id="L35" class="LineNr">35 </span>    <span class="subxComment"># if (EAX &lt; 0) abort</span>
+<span id="L36" class="LineNr">36 </span>    3d/compare-EAX-with  0/imm32
+<span id="L37" class="LineNr">37 </span>    0f 8c/jump-if-lesser  $_write:abort/disp32
+<span id="L38" class="LineNr">38 </span><span class="Constant">$_write:end</span>:
+<span id="L39" class="LineNr">39 </span>    <span class="subxS1Comment"># . restore registers</span>
+<span id="L40" class="LineNr">40 </span>    5b/pop-to-EBX
+<span id="L41" class="LineNr">41 </span>    5a/pop-to-EDX
+<span id="L42" class="LineNr">42 </span>    59/pop-to-ECX
+<span id="L43" class="LineNr">43 </span>    58/pop-to-EAX
+<span id="L44" class="LineNr">44 </span>    <span class="subxS1Comment"># . epilog</span>
+<span id="L45" class="LineNr">45 </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="L46" class="LineNr">46 </span>    5d/pop-to-EBP
+<span id="L47" class="LineNr">47 </span>    c3/return
+<span id="L48" class="LineNr">48 </span>
+<span id="L49" class="LineNr">49 </span><span class="Constant">$_write:abort</span>:
+<span id="L50" class="LineNr">50 </span>    <span class="subxComment"># can't write a message here for risk of an infinite loop, so we'll use a special exit code instead</span>
+<span id="L51" class="LineNr">51 </span>    <span class="subxS1Comment"># . syscall(exit, 255)</span>
+<span id="L52" class="LineNr">52 </span>    bb/copy-to-EBX  0xff/imm32
+<span id="L53" class="LineNr">53 </span>    b8/copy-to-EAX  1/imm32/exit
+<span id="L54" class="LineNr">54 </span>    cd/syscall  0x80/imm8
+<span id="L55" class="LineNr">55 </span>    <span class="subxComment"># never gets here</span>
+<span id="L56" class="LineNr">56 </span>
+<span id="L57" class="LineNr">57 </span><span class="subxS2Comment"># . . vim&#0058;nowrap:textwidth=0</span>
 </pre>
 </body>
 </html>