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/ex6.subx.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'html/subx/examples/ex6.subx.html') diff --git a/html/subx/examples/ex6.subx.html b/html/subx/examples/ex6.subx.html index 77c6293e..8ad44018 100644 --- a/html/subx/examples/ex6.subx.html +++ b/html/subx/examples/ex6.subx.html @@ -55,9 +55,9 @@ if ('onhashchange' in window) {
  1 ## print out a (global variable) string to stdout
  2 #
- 3 # To run:
- 4 #   $ subx translate ex6.subx ex6
- 5 #   $ subx run ex6
+ 3 # To run (from the subx directory):
+ 4 #   $ subx translate examples/ex6.subx -o examples/ex6
+ 5 #   $ subx run examples/ex6
  6 #   Hello, world!
  7 
  8 == code
@@ -67,17 +67,17 @@ if ('onhashchange' in window) {
 12 
 13   # write(stdout, x, size)
 14     # fd = 1 (stdout)
-15   bb/copy                                                                                                                         1/imm32           # copy 1 to EBX
+15   bb/copy                                                                                                                         1/imm32           # copy to EBX
 16     # initialize x (location to write result to)
 17   b9/copy                                                                                                                         x/imm32           # copy to ECX
 18     # initialize size
 19   8b/copy                         0/mod/indirect  5/rm32/.disp32                                      2/r32/EDX   size/disp32                       # copy *size to EDX
 20     # write(fd, x, size)
-21   b8/copy                                                                                                                         4/imm32/write     # copy 4 to EAX
+21   b8/copy                                                                                                                         4/imm32/write     # copy to EAX
 22   cd/syscall  0x80/imm8
 23 
 24   # exit(EBX)
-25   b8/copy                                                                                                                         1/imm32/exit      # copy 1 to EAX
+25   b8/copy                                                                                                                         1/imm32/exit      # copy to EAX
 26   cd/syscall  0x80/imm8
 27 
 28 == data
@@ -85,7 +85,7 @@ if ('onhashchange' in window) {
 30   0e 00 00 00  # 14
 31 x:  # string to print
 32   48 65 6c 6c 6f 2c 20 77 6f 72 6c 64 21 0a       00
-33 # h  e  l  l  o  ,  ␣  w  o  r  l  d  !  newline  null
+33 # H  e  l  l  o  ,  ␣  w  o  r  l  d  !  newline  null
 34 
 35 # vim:ft=subx:nowrap
 
-- cgit 1.4.1-2-gfad0