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/ex1.2.subx2
-rw-r--r--subx/examples/ex10.subx2
-rw-r--r--subx/examples/ex2.subx2
-rw-r--r--subx/examples/ex3.subx2
-rw-r--r--subx/examples/ex4.subx6
-rw-r--r--subx/examples/ex5.subx6
-rw-r--r--subx/examples/ex6.subx4
-rw-r--r--subx/examples/ex7.subx18
-rw-r--r--subx/examples/ex8.subx2
-rw-r--r--subx/examples/ex9.subx2
10 files changed, 23 insertions, 23 deletions
diff --git a/subx/examples/ex1.2.subx b/subx/examples/ex1.2.subx
index 7dca4ec3..a355ef6b 100644
--- a/subx/examples/ex1.2.subx
+++ b/subx/examples/ex1.2.subx
@@ -15,6 +15,6 @@
   bb/copy                                                                                                                         2a/imm32          # copy 42 to EBX
   # exit(EBX)
   b8/copy                                                                                                                         1/imm32           # copy 1 to EAX
-  cd/syscall                                                                                                                      0x80/imm8         # int 80h
+  cd/syscall  0x80/imm8
 
 # vim:ft=subx
diff --git a/subx/examples/ex10.subx b/subx/examples/ex10.subx
index 1b0b0a29..edcda506 100644
--- a/subx/examples/ex10.subx
+++ b/subx/examples/ex10.subx
@@ -31,7 +31,7 @@
   # exit(EAX)
   89/copy                         3/mod/direct    3/rm32/EBX    .           .             .           0/r32/EAX   .               .                 # copy EAX to EBX
   b8/copy                         .               .             .           .             .           .           .               1/imm32           # copy 1 to EAX
-  cd/syscall                      .               .             .           .             .           .           .               0x80/imm8         # int 80h
+  cd/syscall  0x80/imm8
 
 # compare two null-terminated ascii strings
 # reason for the name: the only place we should have null-terminated ascii strings is from commandline args
diff --git a/subx/examples/ex2.subx b/subx/examples/ex2.subx
index 0aad9232..e0c76712 100644
--- a/subx/examples/ex2.subx
+++ b/subx/examples/ex2.subx
@@ -15,6 +15,6 @@
   81          0/subop/add         3/mod/direct    3/rm32/EBX                                                                      1/imm32           # add 1 to EBX
   # exit(EBX)
   b8/copy                                                                                                                         1/imm32           # copy 1 to EAX
-  cd/syscall                                                                                                                      0x80/imm8         # int 80h
+  cd/syscall  0x80/imm8
 
 # vim:ft=subx
diff --git a/subx/examples/ex3.subx b/subx/examples/ex3.subx
index 41a8900a..30a8d5d3 100644
--- a/subx/examples/ex3.subx
+++ b/subx/examples/ex3.subx
@@ -30,6 +30,6 @@ $loop:
 $exit:
   # exit(EBX)
   b8/copy                                                                                                                         1/imm32           # copy 1 to EAX
-  cd/syscall                                                                                                                      0x80/imm8         # int 80h
+  cd/syscall  0x80/imm8
 
 # vim:ft=subx:nowrap
diff --git a/subx/examples/ex4.subx b/subx/examples/ex4.subx
index 512978d1..810278e6 100644
--- a/subx/examples/ex4.subx
+++ b/subx/examples/ex4.subx
@@ -18,7 +18,7 @@
   ba/copy                                                                                                                         1/imm32           # copy 1 to EDX
     # read(fd, x, size)
   b8/copy                                                                                                                         3/imm32/read      # copy 3 to EAX
-  cd/syscall                                                                                                                      0x80/imm8         # int 80h
+  cd/syscall  0x80/imm8
 
   # write(stdout, x, 1)
     # fd = 1 (stdout)
@@ -29,11 +29,11 @@
   ba/copy                                                                                                                         1/imm32           # copy 1 to EDX
     # write(fd, x, size)
   b8/copy                                                                                                                         4/imm32/write     # copy 4 to EAX
-  cd/syscall                                                                                                                      0x80/imm8         # int 80h
+  cd/syscall  0x80/imm8
 
   # exit(EBX)
   b8/copy                                                                                                                         1/imm32/exit      # copy 1 to EAX
-  cd/syscall                                                                                                                      0x80/imm8         # int 80h
+  cd/syscall  0x80/imm8
 
 == data
 x:
diff --git a/subx/examples/ex5.subx b/subx/examples/ex5.subx
index cafad042..16b87bc8 100644
--- a/subx/examples/ex5.subx
+++ b/subx/examples/ex5.subx
@@ -25,7 +25,7 @@
   ba/copy                                                                                                                         1/imm32           # copy 1 to EDX
     # read(fd, x, size)
   b8/copy                                                                                                                         3/imm32/read      # copy 3 to EAX
-  cd/syscall                                                                                                                      0x80/imm8         # int 80h
+  cd/syscall  0x80/imm8
 
   # write(stdout, x, 1)
     # fd = 1 (stdout)
@@ -36,10 +36,10 @@
   ba/copy                                                                                                                         1/imm32           # copy 1 to EDX
     # write(fd, x, size)
   b8/copy                                                                                                                         4/imm32/write     # copy 4 to EAX
-  cd/syscall                                                                                                                      0x80/imm8         # int 80h
+  cd/syscall  0x80/imm8
 
   # exit(EBX)
   b8/copy                                                                                                                         1/imm32/exit      # copy 1 to EAX
-  cd/syscall                                                                                                                      0x80/imm8         # int 80h
+  cd/syscall  0x80/imm8
 
 # vim:ft=subx:nowrap
diff --git a/subx/examples/ex6.subx b/subx/examples/ex6.subx
index 92ad4c21..0213ad7e 100644
--- a/subx/examples/ex6.subx
+++ b/subx/examples/ex6.subx
@@ -19,11 +19,11 @@
   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 4 to EAX
-  cd/syscall                                                                                                                      0x80/imm8         # int 80h
+  cd/syscall  0x80/imm8
 
   # exit(EBX)
   b8/copy                                                                                                                         1/imm32/exit      # copy 1 to EAX
-  cd/syscall                                                                                                                      0x80/imm8         # int 80h
+  cd/syscall  0x80/imm8
 
 == data
 size:  # size of string
diff --git a/subx/examples/ex7.subx b/subx/examples/ex7.subx
index dd615920..a1bb19c8 100644
--- a/subx/examples/ex7.subx
+++ b/subx/examples/ex7.subx
@@ -19,14 +19,14 @@
   bb/copy                         .               .             .           .             .           .           .               filename/imm32          # copy to EBX
   b9/copy                         .               .             .           .             .           .           .               0x180/imm32/fixed-perms # copy to ECX
   b8/copy                         .               .             .           .             .           .           .               8/imm32/creat           # copy 8 to EAX
-  cd/syscall                      .               .             .           .             .           .           .               0x80/imm8               # int 80h
+  cd/syscall  0x80/imm8
 
   # stream = open(filename, O_WRONLY, 0)  # we can't use 'fd' because it looks like a hex byte
   bb/copy                         .               .             .           .             .           .           .               filename/imm32          # copy to EBX
   b9/copy                         .               .             .           .             .           .           .               1/imm32/wronly          # copy 1 to ECX
   ba/copy                         .               .             .           .             .           .           .               0x180/imm32/fixed-perms # copy 0 to EDX
   b8/copy                         .               .             .           .             .           .           .               5/imm32/open            # copy 5 to EAX
-  cd/syscall                      .               .             .           .             .           .           .               0x80/imm8               # int 80h
+  cd/syscall  0x80/imm8
     # save stream
   bb/copy                         .               .             .           .             .           .           .               stream/imm32            # copy to EBX
   89/copy                         0/mod/indirect  3/rm32/EBX                                          0/r32/EAX                                           # copy EAX to *EBX
@@ -39,7 +39,7 @@
   b9/copy                         .               .             .           .             .           .           .               a/imm32                 # copy to ECX
   ba/copy                         .               .             .           .             .           .           .               1/imm32/size            # copy 1 to EDX
   b8/copy                         .               .             .           .             .           .           .               4/imm32/write           # copy 4 to EAX
-  cd/syscall                      .               .             .           .             .           .           .               0x80/imm8               # int 80h
+  cd/syscall  0x80/imm8
 
   # close(stream)
     # load stream
@@ -47,14 +47,14 @@
   8b/copy                         0/mod/indirect  3/rm32/EBX                                          3/r32/EBX                                           # copy *EBX to EBX
     #
   b8/copy                         .               .             .           .             .           .           .               6/imm32/close           # copy 6 to EAX
-  cd/syscall                      .               .             .           .             .           .           .               0x80/imm8               # int 80h
+  cd/syscall  0x80/imm8
 
   # stream = open(filename, O_RDONLY, 0)
   bb/copy                         .               .             .           .             .           .           .               filename/imm32          # copy to EBX
   b9/copy                         .               .             .           .             .           .           .               0/imm32/rdonly          # copy 0 to ECX
   ba/copy                         .               .             .           .             .           .           .               0x180/imm32/fixed-perms # copy to EDX
   b8/copy                         .               .             .           .             .           .           .               5/imm32/open            # copy 5 to EAX
-  cd/syscall                      .               .             .           .             .           .           .               0x80/imm8               # int 80h
+  cd/syscall  0x80/imm8
     # save stream
   bb/copy                         .               .             .           .             .           .           .               stream/imm32            # copy to EBX
   89/copy                         0/mod/indirect  3/rm32/EBX                                          0/r32/EAX                                           # copy EAX to *EBX
@@ -67,7 +67,7 @@
   b9/copy                         .               .             .           .             .           .           .               b/imm32                 # copy to ECX
   ba/copy                         .               .             .           .             .           .           .               1/imm32/size            # copy 1 to EDX
   b8/copy                         .               .             .           .             .           .           .               3/imm32/read            # copy 3 to EAX
-  cd/syscall                      .               .             .           .             .           .           .               0x80/imm8               # int 80h
+  cd/syscall  0x80/imm8
 
   # close(stream)
     # load stream
@@ -75,12 +75,12 @@
   8b/copy                         0/mod/indirect  3/rm32/EBX                                          3/r32/EBX                                           # copy *EBX to EBX
     #
   b8/copy                         .               .             .           .             .           .           .               6/imm32/close           # copy 6 to EAX
-  cd/syscall                      .               .             .           .             .           .           .               0x80/imm8               # int 80h
+  cd/syscall  0x80/imm8
 
   # unlink(filename)
   bb/copy                         .               .             .           .             .           .           .               filename/imm32          # copy to EBX
   b8/copy                         .               .             .           .             .           .           .               0xa/imm32/unlink        # copy 10 to EAX
-  cd/syscall                      .               .             .           .             .           .           .               0x80/imm8               # int 80h
+  cd/syscall  0x80/imm8
 
   # exit(b)
     # load b
@@ -88,7 +88,7 @@
   8b/copy                         0/mod/indirect  3/rm32/EBX                                          3/r32/EBX                                           # copy *EBX to EBX
     #
   b8/copy                         .               .             .           .             .           .           .               1/imm32/exit            # copy 1 to EAX
-  cd/syscall                      .               .             .           .             .           .           .               0x80/imm8               # int 80h
+  cd/syscall  0x80/imm8
 
 == data
 stream:
diff --git a/subx/examples/ex8.subx b/subx/examples/ex8.subx
index de0fa188..f06e8c92 100644
--- a/subx/examples/ex8.subx
+++ b/subx/examples/ex8.subx
@@ -37,7 +37,7 @@
   # exit(EAX)
   89/copy                         3/mod/direct    3/rm32/EBX    .           .             .           0/r32/EAX   .               .                       # copy EAX to EBX
   b8/copy                         .               .             .           .             .           .           .               1/imm32/exit            # copy 1 to EAX
-  cd/syscall                      .               .             .           .             .           .           .               0x80/imm8               # int 80h
+  cd/syscall  0x80/imm8
 
 ascii_length:  # (s)
   # initialize s (EDX)
diff --git a/subx/examples/ex9.subx b/subx/examples/ex9.subx
index aa519dc1..91e62159 100644
--- a/subx/examples/ex9.subx
+++ b/subx/examples/ex9.subx
@@ -35,7 +35,7 @@
   # exit(EAX)
   89/copy                         3/mod/direct    3/rm32/EBX    .           .             .           0/r32/EAX   .               .                 # copy EAX to EBX
   b8/copy                         .               .             .           .             .           .           .               1/imm32/exit      # copy 1 to EAX
-  cd/syscall                      .               .             .           .             .           .           .               0x80/imm8         # int 80h
+  cd/syscall  0x80/imm8
 
 ascii_difference:  # (s1, s2) : null-terminated ascii strings
   # a = first letter of s1 (ECX)
&id=ef7d834fdd826977cd8d43253052a7b8e1c5aa72'>^
204dae92 ^
805d58c6 ^


204dae92 ^

b301e0c0 ^
805d58c6 ^
b301e0c0 ^
805d58c6 ^
204dae92 ^

b301e0c0 ^
204dae92 ^

b301e0c0 ^

cdf28227 ^

204dae92 ^

b301e0c0 ^
204dae92 ^
4a48bedc ^
b301e0c0 ^
204dae92 ^






cdf28227 ^
204dae92 ^
4a48bedc ^
204dae92 ^
805d58c6 ^





cdf28227 ^
805d58c6 ^





204dae92 ^
cdf28227 ^
204dae92 ^

cdf28227 ^
204dae92 ^
4a48bedc ^
cdf28227 ^
204dae92 ^


b301e0c0 ^
204dae92 ^
4a48bedc ^
204dae92 ^


805d58c6 ^





204dae92 ^



b301e0c0 ^
204dae92 ^
4a48bedc ^
204dae92 ^


805d58c6 ^




204dae92 ^

b301e0c0 ^

204dae92 ^





b301e0c0 ^
805d58c6 ^

204dae92 ^

805d58c6 ^

204dae92 ^

b4d5b589 ^



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
104
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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242