about summary refs log tree commit diff stats
path: root/subx/examples/ex7.subx
diff options
context:
space:
mode:
Diffstat (limited to 'subx/examples/ex7.subx')
-rw-r--r--subx/examples/ex7.subx21
1 files changed, 11 insertions, 10 deletions
diff --git a/subx/examples/ex7.subx b/subx/examples/ex7.subx
index 3650817d..e28ff89b 100644
--- a/subx/examples/ex7.subx
+++ b/subx/examples/ex7.subx
@@ -1,4 +1,5 @@
-## example showing file syscalls
+# Example showing file syscalls.
+#
 # Create a file, open it for writing, write a character to it, close it, open
 # it for reading, read a character from it, close it, delete it, and return
 # the character read.
@@ -32,20 +33,20 @@
     89/copy                         0/mod/indirect  3/rm32/EBX    .           .             .           0/r32/EAX   .               .                       # copy EAX to *EBX
 
     # syscall(write, Stream, "a", 1)
-    # load stream
+    # . load stream
     bb/copy-to-EBX  Stream/imm32
     8b/copy                         0/mod/indirect  3/rm32/EBX    .           .             .           3/r32/EBX   .               .                       # copy *EBX to EBX
-    #
+    # .
     b9/copy-to-ECX  A/imm32
     ba/copy-to-EDX  1/imm32/size
     b8/copy-to-EAX  4/imm32/write
     cd/syscall  0x80/imm8
 
     # syscall(close, Stream)
-    # load stream
+    # . load stream
     bb/copy-to-EBX  Stream/imm32
     8b/copy                         0/mod/indirect  3/rm32/EBX    .           .             .           3/r32/EBX   .               .                       # copy *EBX to EBX
-    #
+    # .
     b8/copy-to-EAX  6/imm32/close
     cd/syscall  0x80/imm8
 
@@ -55,22 +56,22 @@
     ba/copy-to-EDX  0x180/imm32/fixed-perms
     b8/copy-to-EAX  5/imm32/open
     cd/syscall  0x80/imm8
-    # save Stream
+    # . save Stream
     bb/copy-to-EBX  Stream/imm32
     89/copy                         0/mod/indirect  3/rm32/EBX    .           .             .           0/r32/EAX   .               .                       # copy EAX to *EBX
 
     # syscall(read, Stream, B, 1)
-    # load stream
+    # . load stream
     bb/copy-to-EBX  Stream/imm32
     8b/copy                         0/mod/indirect  3/rm32/EBX    .           .             .           3/r32/EBX   .               .                       # copy *EBX to EBX
-    #
+    # .
     b9/copy-to-ECX  B/imm32
     ba/copy-to-EDX  1/imm32/size
     b8/copy-to-EAX  3/imm32/read
     cd/syscall  0x80/imm8
 
     # syscall(close, Stream)
-    # load stream
+    # . load stream
     bb/copy-to-EBX  Stream/imm32
     8b/copy                         0/mod/indirect  3/rm32/EBX    .           .             .           3/r32/EBX   .               .                       # copy *EBX to EBX
     #
@@ -83,7 +84,7 @@
     cd/syscall  0x80/imm8
 
     # syscall(exit, b)
-    # load b
+    # . load b
     bb/copy-to-EBX  B/imm32
     8b/copy                         0/mod/indirect  3/rm32/EBX    .           .             .           3/r32/EBX   .               .                       # copy *EBX to EBX
     #