about summary refs log tree commit diff stats
path: root/subx/examples/ex4.subx
diff options
context:
space:
mode:
Diffstat (limited to 'subx/examples/ex4.subx')
-rw-r--r--subx/examples/ex4.subx13
1 files changed, 7 insertions, 6 deletions
diff --git a/subx/examples/ex4.subx b/subx/examples/ex4.subx
index b18a5da0..a1f042ed 100644
--- a/subx/examples/ex4.subx
+++ b/subx/examples/ex4.subx
@@ -4,7 +4,13 @@
 #   $ ./subx translate examples/ex4.subx -o examples/ex4
 #   $ ./subx run examples/ex4
 
-== code
+== data 0x0a000000
+
+# the global variable we save to
+X:
+    0/imm32  # space for read() to write to
+
+== code 0x09000000
 
 # syscall(read, stdin, X, 1)
 # . fd = 0 (stdin)
@@ -32,9 +38,4 @@ cd/syscall  0x80/imm8
 b8/copy-to-EAX  1/imm32/exit
 cd/syscall  0x80/imm8
 
-== data
-
-X:
-    0/imm32  # space for read() to write to
-
 # . . vim:nowrap:textwidth=0