From 5a2cb154eb016aa8b84ad939f63eb56dd7a0a90f Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Tue, 2 Oct 2018 01:21:01 -0700 Subject: 4649 --- html/subx/examples/ex2.subx.html | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'html/subx/examples/ex2.subx.html') diff --git a/html/subx/examples/ex2.subx.html b/html/subx/examples/ex2.subx.html index 79014ace..81cce37f 100644 --- a/html/subx/examples/ex2.subx.html +++ b/html/subx/examples/ex2.subx.html @@ -16,6 +16,7 @@ a { color:#eeeeee; text-decoration: none; } a:hover { text-decoration: underline; } * { font-size: 12pt; font-size: 1em; } .LineNr { color: #444444; } +.Delimiter { color: #800080; } .Comment { color: #9090ff; } .Comment a { color:#0000ee; text-decoration:underline; } .SalientComment { color: #00ffff; } @@ -55,9 +56,9 @@ if ('onhashchange' in window) {
  1 ## add 1 and 1, and return the result in the exit code
  2 #
- 3 # To run:
- 4 #   $ subx translate ex2.subx ex2
- 5 #   $ subx run ex2
+ 3 # To run (from the subx directory):
+ 4 #   $ subx translate examples/ex2.subx -o examples/ex2
+ 5 #   $ subx run examples/ex2
  6 # Expected result:
  7 #   $ echo $?
  8 #   2
@@ -66,10 +67,10 @@ if ('onhashchange' in window) {
 11 # instruction                     effective address                                                   operand     displacement    immediate
 12 # op          subop               mod             rm32          base        index         scale       r32
 13 # 1-3 bytes   3 bits              2 bits          3 bits        3 bits      3 bits        2 bits      2 bits      0/1/2/4 bytes   0/1/2/4 bytes
-14   bb/copy                                                                                                                         1/imm32           # copy 1 to EBX
-15   81          0/subop/add         3/mod/direct    3/rm32/EBX                                                                      1/imm32           # add 1 to EBX
+14   bb/copy                         .               .             .           .             .           .           .               1/imm32           # copy to EBX
+15   43/inc-EBX
 16   # exit(EBX)
-17   b8/copy                                                                                                                         1/imm32           # copy 1 to EAX
+17   b8/copy                         .               .             .           .             .           .           .               1/imm32           # copy to EAX
 18   cd/syscall  0x80/imm8
 19 
 20 # vim:ft=subx
-- 
cgit 1.4.1-2-gfad0