From 9d27e966b5e9bf1bd3da48f49d7e133d112a2bbe Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Fri, 30 Nov 2018 16:45:15 -0800 Subject: 4808 - clean up comments in all subx files --- subx/examples/ex4.subx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'subx/examples/ex4.subx') diff --git a/subx/examples/ex4.subx b/subx/examples/ex4.subx index 2fd15cd7..964d4a60 100644 --- a/subx/examples/ex4.subx +++ b/subx/examples/ex4.subx @@ -1,4 +1,4 @@ -## read a character from stdin, save it to a global, write it to stdout +# Read a character from stdin, save it to a global, write it to stdout. # # To run (from the subx directory): # $ subx translate examples/ex4.subx -o examples/ex4 @@ -7,24 +7,24 @@ == code # syscall(read, stdin, X, 1) - # fd = 0 (stdin) +# . fd = 0 (stdin) bb/copy-to-EBX 0/imm32 - # initialize X (location to write result to) +# . data = X (location to write result to) b9/copy-to-ECX X/imm32 - # size = 1 character +# . size = 1 character ba/copy-to-EDX 1/imm32 - # syscall +# . syscall b8/copy-to-EAX 3/imm32/read cd/syscall 0x80/imm8 # syscall(write, stdout, X, 1) - # fd = 1 (stdout) +# . fd = 1 (stdout) bb/copy-to-EBX 1/imm32 - # initialize X (location to read from) +# . initialize X (location to read from) b9/copy-to-ECX X/imm32 - # size = 1 character +# . size = 1 character ba/copy-to-EDX 1/imm32 - # syscall +# . syscall b8/copy-to-EAX 4/imm32/write cd/syscall 0x80/imm8 -- cgit 1.4.1-2-gfad0 it/themes/joker?id=0410802753ec49ecfd699d55c636d41b3d143e01'>commit diff stats
path: root/themes/joker
blob: 39324896fe142a6d4af236c05e8e219ca865b189 (plain) (blame)
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