From 4068f0ca5b3a380790794a986897815d8b6a45a8 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Wed, 20 Mar 2019 17:08:43 -0700 Subject: 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. --- subx/examples/ex10.subx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'subx/examples/ex10.subx') 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 -- cgit 1.4.1-2-gfad0