-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhello_user_name.yml
69 lines (67 loc) · 2.55 KB
/
hello_user_name.yml
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
in_source: |
(set name (readline))
(print "Hello, ")
(print name)
(print "!")
in_stdin: |
Andrew
out_stdout: |
Hello, Andrew!
out_debug: |-
##### Data memory #####
<address> <length> <data>
0x00000000 8 'Hello, '
0x00000008 2 '!'
##### Instruction memory #####
<address> <hexcode> <mnemonica>
#:
0x00000000 0x0c200025 br *0x25 ('start' function)
readline:
0x00000001 0x06000000 push
0x00000002 0x06000000 push
0x00000003 0x02100000 ld #0x0
0x00000004 0x06000000 push
0x00000005 0x022015b3 ld *0x15b3
0x00000006 0x0910000a cmp #0xa
0x00000007 0x0a300008 bre *ipr+0x8
0x00000008 0x03500001 st **spr+0x1
0x00000009 0x0d400001 inc *spr+0x1
0x0000000a 0x0d400000 inc *spr
0x0000000b 0x02400000 ld *spr
0x0000000c 0x09100080 cmp #0x80
0x0000000d 0x0a300002 bre *ipr+0x2
0x0000000e 0x0c3ffff7 br *ipr-0x9
0x0000000f 0x02100000 ld #0x0
0x00000010 0x03500001 st **spr+0x1
0x00000011 0x07000000 pop
0x00000012 0x07000000 pop
0x00000013 0x07000000 pop
0x00000014 0x05000000 ret
print:
0x00000015 0x06000000 push
0x00000016 0x02100000 ld #0x0
0x00000017 0x06000000 push
0x00000018 0x02500001 ld **spr+0x1
0x00000019 0x09100000 cmp #0x0
0x0000001a 0x0a300008 bre *ipr+0x8
0x0000001b 0x032015b4 st *0x15b4
0x0000001c 0x0d400001 inc *spr+0x1
0x0000001d 0x0d400000 inc *spr
0x0000001e 0x02400000 ld *spr
0x0000001f 0x09100080 cmp #0x80
0x00000020 0x0a300002 bre *ipr+0x2
0x00000021 0x0c3ffff7 br *ipr-0x9
0x00000022 0x07000000 pop
0x00000023 0x08000000 popn
0x00000024 0x05000000 ret
start:
0x00000025 0x0210000b ld #0xb ('anon$0' const)
0x00000026 0x04200001 call *0x1 ('readline' function)
0x00000027 0x0320000a st *0xa ('name' variable)
0x00000028 0x02100000 ld #0x0 ('Hello, ' const)
0x00000029 0x04200015 call *0x15 ('print' function)
0x0000002a 0x0220000a ld *0xa ('name' variable)
0x0000002b 0x04200015 call *0x15 ('print' function)
0x0000002c 0x02100008 ld #0x8 ('!' const)
0x0000002d 0x04200015 call *0x15 ('print' function)
0x0000002e 0x01000000 halt