Commit | Line | Data |
---|---|---|
4a71579b PC |
1 | .data 32 |
2 | fmt: | |
3 | .c "%d + %d = %d\n" | |
4 | ||
5 | .code | |
6 | jmpi main | |
7 | ||
8 | name test | |
9 | test: | |
10 | prolog | |
11 | arg $i0 | |
12 | arg $i1 | |
13 | getarg %r0 $i0 | |
14 | getarg %r1 $i1 | |
15 | addr %r0 %r0 %r1 | |
16 | retr %r0 | |
17 | epilog | |
18 | ||
19 | name main | |
20 | main: | |
21 | prolog | |
22 | prepare | |
23 | pushargi 5 | |
24 | pushargi 4 | |
25 | finishi test | |
26 | retval %r0 | |
27 | prepare | |
28 | pushargi fmt | |
29 | ellipsis | |
30 | pushargi 5 | |
31 | pushargi 4 | |
32 | pushargr %r0 | |
33 | finishi @printf | |
34 | ret | |
35 | epilog |