about summary refs log tree commit diff stats
path: root/subx
diff options
context:
space:
mode:
Diffstat (limited to 'subx')
-rw-r--r--subx/examples/ex1.subx4
-rw-r--r--subx/examples/ex3.subx10
-rw-r--r--subx/examples/ex4.subx18
-rw-r--r--subx/examples/ex6.subx10
4 files changed, 21 insertions, 21 deletions
diff --git a/subx/examples/ex1.subx b/subx/examples/ex1.subx
index 790e24fe..579ac9f4 100644
--- a/subx/examples/ex1.subx
+++ b/subx/examples/ex1.subx
@@ -12,9 +12,9 @@
 # instruction                     effective address                                                   operand     displacement    immediate
 # op          subop               mod             rm32          base        index         scale       r32
 # 1-3 bytes   3 bits              2 bits          3 bits        3 bits      3 bits        2 bits      2 bits      0/1/2/4 bytes   0/1/2/4 bytes
-  bb/copy                                                                                                                         2a/imm32          # copy 42 to EBX
+  bb/copy                         .               .             .           .             .           .           .               2a/imm32          # copy 42 to EBX
   # exit(EBX)
-  b8/copy                                                                                                                         1/imm32           # copy to EAX
+  b8/copy                         .               .             .           .             .           .           .               1/imm32           # copy to EAX
   cd/syscall  0x80/imm8
 
 # vim:ft=subx
diff --git a/subx/examples/ex3.subx b/subx/examples/ex3.subx
index 0a90e26e..caa4d9cf 100644
--- a/subx/examples/ex3.subx
+++ b/subx/examples/ex3.subx
@@ -12,16 +12,16 @@
 # op          subop               mod             rm32          base        index         scale       r32
 # 1-3 bytes   3 bits              2 bits          3 bits        3 bits      3 bits        2 bits      2 bits      0/1/2/4 bytes   0/1/2/4 bytes
   # result: EBX = 0
-  bb/copy                                                                                                                         0/imm32           # copy to EBX
+  bb/copy                         .               .             .           .             .           .           .               0/imm32           # copy to EBX
   # counter: ECX = 1
-  b9/copy                                                                                                                         1/imm32           # copy to ECX
+  b9/copy                         .               .             .           .             .           .           .               1/imm32           # copy to ECX
 
 $loop:
   # while (counter <= 10)
-  81          7/subop/compare     3/mod/direct    1/rm32/ECX                                                                      0xa/imm32         # compare ECX
+  81          7/subop/compare     3/mod/direct    1/rm32/ECX    .           .             .           .           .               0xa/imm32         # compare ECX
   7f/jump-if-greater  $exit/disp8
   # result += counter
-  01/add                          3/mod/direct    3/rm32/EBX                                          1/r32/ECX                                     # add ECX to EBX
+  01/add                          3/mod/direct    3/rm32/EBX    .           .             .           1/r32/ECX   .               .                 # add ECX to EBX
   # ++counter
   41/inc-ECX
   # loop
@@ -29,7 +29,7 @@ $loop:
 
 $exit:
   # exit(EBX)
-  b8/copy                                                                                                                         1/imm32           # copy to EAX
+  b8/copy                         .               .             .           .             .           .           .               1/imm32           # copy to EAX
   cd/syscall  0x80/imm8
 
 # vim:ft=subx:nowrap
diff --git a/subx/examples/ex4.subx b/subx/examples/ex4.subx
index 965acd22..2d5f05b2 100644
--- a/subx/examples/ex4.subx
+++ b/subx/examples/ex4.subx
@@ -11,28 +11,28 @@
 
   # read(stdin, x, 1)
     # fd = 0 (stdin)
-  bb/copy                                                                                                                         0/imm32           # copy to EBX
+  bb/copy                         .               .             .           .             .           .           .               0/imm32           # copy to EBX
     # initialize x (location to write result to)
-  b9/copy                                                                                                                         x/imm32           # copy to ECX
+  b9/copy                         .               .             .           .             .           .           .               x/imm32           # copy to ECX
     # size = 1 character
-  ba/copy                                                                                                                         1/imm32           # copy to EDX
+  ba/copy                         .               .             .           .             .           .           .               1/imm32           # copy to EDX
     # read(fd, x, size)
-  b8/copy                                                                                                                         3/imm32/read      # copy to EAX
+  b8/copy                         .               .             .           .             .           .           .               3/imm32/read      # copy to EAX
   cd/syscall  0x80/imm8
 
   # write(stdout, x, 1)
     # fd = 1 (stdout)
-  bb/copy                                                                                                                         1/imm32           # copy to EBX
+  bb/copy                         .               .             .           .             .           .           .               1/imm32           # copy to EBX
     # initialize x (location to read from)
-  b9/copy                                                                                                                         x/imm32           # copy to ECX
+  b9/copy                         .               .             .           .             .           .           .               x/imm32           # copy to ECX
     # size = 1 character
-  ba/copy                                                                                                                         1/imm32           # copy to EDX
+  ba/copy                         .               .             .           .             .           .           .               1/imm32           # copy to EDX
     # write(fd, x, size)
-  b8/copy                                                                                                                         4/imm32/write     # copy to EAX
+  b8/copy                         .               .             .           .             .           .           .               4/imm32/write     # copy to EAX
   cd/syscall  0x80/imm8
 
   # exit(EBX)
-  b8/copy                                                                                                                         1/imm32/exit      # copy to EAX
+  b8/copy                         .               .             .           .             .           .           .               1/imm32/exit      # copy to EAX
   cd/syscall  0x80/imm8
 
 == data
diff --git a/subx/examples/ex6.subx b/subx/examples/ex6.subx
index 17a0c6fe..9172cab3 100644
--- a/subx/examples/ex6.subx
+++ b/subx/examples/ex6.subx
@@ -12,17 +12,17 @@
 
   # write(stdout, x, size)
     # fd = 1 (stdout)
-  bb/copy                                                                                                                         1/imm32           # copy to EBX
+  bb/copy                         .               .             .           .             .           .           .               1/imm32           # copy to EBX
     # initialize x (location to write result to)
-  b9/copy                                                                                                                         x/imm32           # copy to ECX
+  b9/copy                         .               .             .           .             .           .           .               x/imm32           # copy to ECX
     # initialize size
-  8b/copy                         0/mod/indirect  5/rm32/.disp32                                      2/r32/EDX   size/disp32                       # copy *size to EDX
+  8b/copy                         0/mod/indirect  5/rm32/.disp32            .             .           2/r32/EDX   size/disp32     .                 # copy *size to EDX
     # write(fd, x, size)
-  b8/copy                                                                                                                         4/imm32/write     # copy to EAX
+  b8/copy                         .               .             .           .             .           .           .               4/imm32/write     # copy to EAX
   cd/syscall  0x80/imm8
 
   # exit(EBX)
-  b8/copy                                                                                                                         1/imm32/exit      # copy to EAX
+  b8/copy                         .               .             .           .             .           .           .               1/imm32/exit      # copy to EAX
   cd/syscall  0x80/imm8
 
 == data
-09 07:07:42 +0100 committer nfnty <git@nfnty.se> 2017-02-09 07:10:09 +0100 setup.py: Improve readability' href='/akspecs/ranger/commit/setup.py?h=v1.9.0b3&id=6bc13af09f394e3b508acbf879beb821e612f72c'>6bc13af0 ^
1a6d1846 ^



3cd8a402 ^
76791a70 ^

6bc13af0 ^

76791a70 ^


6bc13af0 ^







fe5f90d3 ^
6bc13af0 ^



144de554 ^



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103