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
>105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198