about summary refs log tree commit diff stats
path: root/055stream.subx
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-09-19 00:33:21 -0700
committerKartik Agaram <vc@akkartik.com>2019-09-19 00:33:21 -0700
commit6ecddbaa92289fc6cbd3016b24c09db24cf1f2c2 (patch)
tree8271be5f95688b407b8fdb17ea3e04121cc19c63 /055stream.subx
parent368212b1c315a800abc6c1dedeec09774ebe623f (diff)
downloadmu-6ecddbaa92289fc6cbd3016b24c09db24cf1f2c2.tar.gz
5666 - start of sugar for structured control flow
Diffstat (limited to '055stream.subx')
-rw-r--r--055stream.subx3
1 files changed, 1 insertions, 2 deletions
diff --git a/055stream.subx b/055stream.subx
index d4985a27..32b389bd 100644
--- a/055stream.subx
+++ b/055stream.subx
@@ -33,13 +33,12 @@ clear-stream:  # f : (address stream) -> <void>
     c7          0/subop/copy        1/mod/*+disp8   0/rm32/eax    .           .             .           .           4/disp8         0/imm32           # copy to *(eax+4)
     # eax = f->data
     81          0/subop/add         3/mod/direct    0/rm32/eax    .           .             .           .           .               0xc/imm32         # add to eax
-    # while (true)
 $clear-stream:loop:
     # if (eax >= ecx) break
     39/compare                      3/mod/direct    0/rm32/eax    .           .             .           1/r32/ecx   .               .                 # compare eax with ecx
     73/jump-if-greater-or-equal-unsigned  $clear-stream:end/disp8
     # *eax = 0
-    c6          0/subop/copy        0/mod/direct    0/rm32/eax    .           .             .           .           .               0/imm8            # copy byte to *eax
+    c6          0/subop/copy-byte   0/mod/direct    0/rm32/eax    .           .             .           .           .               0/imm8            # copy byte to *eax
     # ++eax
     40/increment-eax
     eb/jump  $clear-stream:loop/disp8