about summary refs log tree commit diff stats
path: root/subx/examples
diff options
context:
space:
mode:
Diffstat (limited to 'subx/examples')
-rw-r--r--subx/examples/ex3.subx4
-rw-r--r--subx/examples/ex8.subx6
2 files changed, 5 insertions, 5 deletions
diff --git a/subx/examples/ex3.subx b/subx/examples/ex3.subx
index eb4d6c01..41a8900a 100644
--- a/subx/examples/ex3.subx
+++ b/subx/examples/ex3.subx
@@ -19,13 +19,13 @@
 $loop:
   # while (counter <= 10)
   81          7/subop/compare     3/mod/direct    1/rm32/ECX                                                                      0xa/imm32         # compare ECX, 10/imm
-  7f/jump-if                                                                                                      $exit/disp8                       # jump-if-greater $exit
+  7f/jump-if-greater  $exit/disp8
   # result += counter
   01/add                          3/mod/direct    3/rm32/EBX                                          1/r32/ECX                                     # add ECX to EBX
   # ++counter
   81          0/subop/add         3/mod/direct    1/rm32/ECX                                                                      1/imm32           # add 1 to ECX
   # loop
-  eb/jump                                                                                                         $loop/disp8                       # jump $loop
+  eb/jump  $loop/disp8
 
 $exit:
   # exit(EBX)
diff --git a/subx/examples/ex8.subx b/subx/examples/ex8.subx
index 1d9e9341..6ec8d4b0 100644
--- a/subx/examples/ex8.subx
+++ b/subx/examples/ex8.subx
@@ -27,7 +27,7 @@
     # push args
   53/push                         .               .             .           .             .           .           .               .                       # push EBX
     # call
-  e8/call                         .               .             .           .             .           .           ascii_length/disp32
+  e8/call  ascii_length/disp32
     # discard args
   5a/pop                          .               .             .           .             .           .           .               .                       # pop into EDX
     # clean up after call
@@ -49,13 +49,13 @@ $al_loop:
   8a/copy                         0/mod/*         2/rm32/EDX    .           .             .           1/r32/ECX   .               .                       # copy byte at *EDX to lower byte of ECX
   # if c == '\0' break
   81          7/subop/compare     3/mod/direct    1/rm32/ECX    .           .             .           .           .               0/imm32                 # compare ECX with 0
-  74/jump-if-zero                 .               .             .           .             .           .           .               $al_ret/disp8           # jump if equal
+  74/jump-if-equal  $al_ret/disp8
   # ++s
   81          0/subop/add         3/mod/direct    2/rm32/EDX    .           .             .           .           .               1/imm32                 # add 1 to EDX
   # ++result
   81          0/subop/add         3/mod/direct    0/rm32/EAX    .           .             .           .           .               1/imm32                 # add 1 to EAX
   # loop
-  eb/jump                         .               .             .           .             .           .           .               $al_loop/disp8          # jump $al_loop
+  eb/jump  $al_loop/disp8
 $al_ret:
   # return (result in EAX)
   c3/return
ref='#n243'>243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374