about summary refs log tree commit diff stats
path: root/subx/examples
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-03-20 17:08:43 -0700
committerKartik Agaram <vc@akkartik.com>2019-03-20 17:33:42 -0700
commit4068f0ca5b3a380790794a986897815d8b6a45a8 (patch)
tree3549ac214d5f2dfe6321ec4bc81f45b8d79b925d /subx/examples
parent5c21976b5837484264b26557013e3b9264b4ee89 (diff)
downloadmu-4068f0ca5b3a380790794a986897815d8b6a45a8.tar.gz
5011
New convention: compare 'with' for asymmetric comparisons (greater or lesser
than), and compare 'and' for symmetric comparisons. Worth making this distinction
even though the opcodes are identical; when we compare 'with', the order
of operands is significant.
Diffstat (limited to 'subx/examples')
-rw-r--r--subx/examples/ex10.subx2
-rw-r--r--subx/examples/ex11.subx2
2 files changed, 2 insertions, 2 deletions
diff --git a/subx/examples/ex10.subx b/subx/examples/ex10.subx
index 7b88f582..72da1da0 100644
--- a/subx/examples/ex10.subx
+++ b/subx/examples/ex10.subx
@@ -48,7 +48,7 @@ $argv-equal:loop:
     3d/compare-EAX  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 with EBX
+    39/compare                      3/mod/direct    0/rm32/EAX    .           .             .           3/r32/EBX   .               .                 # compare EAX and EBX
     75/jump-if-not-equal  $argv-equal:false/disp8
     # ++s1, ++s2
     41/inc-ECX
diff --git a/subx/examples/ex11.subx b/subx/examples/ex11.subx
index 5f069ca8..8414351b 100644
--- a/subx/examples/ex11.subx
+++ b/subx/examples/ex11.subx
@@ -83,7 +83,7 @@ $kernel-string-equal?:loop:
     3d/compare-EAX  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 with EBX
+    39/compare                      3/mod/direct    0/rm32/EAX    .           .             .           3/r32/EBX   .               .                 # compare EAX and EBX
     75/jump-if-not-equal  $kernel-string-equal?:false/disp8
     # ++i
     41/inc-ECX