about summary refs log tree commit diff stats
path: root/subx/examples
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-03-29 22:42:22 -0700
committerKartik Agaram <vc@akkartik.com>2019-03-29 22:42:22 -0700
commit47fe603d47e97c2d7fee113d907363a245dd2bfc (patch)
treef943e013223f28be5e540cb374438894f9913054 /subx/examples
parent3c332686b57384d0e3db8f803a51562f81bc56cb (diff)
downloadmu-47fe603d47e97c2d7fee113d907363a245dd2bfc.tar.gz
5037
Diffstat (limited to 'subx/examples')
-rw-r--r--subx/examples/ex10.subx2
-rw-r--r--subx/examples/ex11.subx4
2 files changed, 3 insertions, 3 deletions
diff --git a/subx/examples/ex10.subx b/subx/examples/ex10.subx
index 72da1da0..f68f1afd 100644
--- a/subx/examples/ex10.subx
+++ b/subx/examples/ex10.subx
@@ -45,7 +45,7 @@ $argv-equal:loop:
     bb/copy-to-EBX  0/imm32
     8a/copy-byte                    0/mod/indirect  2/rm32/EDX    .           .             .           3/r32/BL    .               .                 # copy byte at *EDX to BL
     # if (c1 == 0) break
-    3d/compare-EAX  0/imm32
+    3d/compare-EAX-and  0/imm32
     74/jump-if-equal  $argv-equal:break/disp8
     # if (c1 != c2) return false
     39/compare                      3/mod/direct    0/rm32/EAX    .           .             .           3/r32/EBX   .               .                 # compare EAX and EBX
diff --git a/subx/examples/ex11.subx b/subx/examples/ex11.subx
index 8414351b..e07d0f90 100644
--- a/subx/examples/ex11.subx
+++ b/subx/examples/ex11.subx
@@ -80,7 +80,7 @@ $kernel-string-equal?:loop:
     # c2 = *s2
     8a/copy-byte                    0/mod/indirect  6/rm32/ESI    .           .             .           3/r32/BL    .               .                 # copy byte at *ESI to BL
     # if (c1 == 0) return false
-    3d/compare-EAX  0/imm32
+    3d/compare-EAX-and  0/imm32
     74/jump-if-equal  $kernel-string-equal?:false/disp8
     # if (c1 != c2) return false
     39/compare                      3/mod/direct    0/rm32/EAX    .           .             .           3/r32/EBX   .               .                 # compare EAX and EBX
@@ -95,7 +95,7 @@ $kernel-string-equal?:loop:
 $kernel-string-equal?:break:
     # return *s1 == 0
     8a/copy-byte                    0/mod/indirect  7/rm32/EDI    .           .             .           0/r32/AL    .               .                 # copy byte at *EDI to AL
-    3d/compare-EAX  0/imm32
+    3d/compare-EAX-and  0/imm32
     75/jump-if-not-equal  $kernel-string-equal?:false/disp8
 $kernel-string-equal?:true:
     b8/copy-to-EAX  1/imm32