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
|
;; .globl _start
_start:
la a0, start_str
call puts
addi sp, sp, -8
la t0, helloworld
sw t0, 4(sp)
li t0, 69
sw t0, 0(sp)
la a0, fmtstr2
call printf
addi sp, sp, -4
sw a0, 0(sp)
la a0, fmtstr2
call printf
la a0, fmtstr3
call printf
la a0, end_str
call puts
loop:
j loop
.section .data
fmtstr3:
.ascii "%s\0"
fmtstr2:
.ascii "%d\n"
.byte 0x0
fmtstr:
.ascii "hello %d %d%d %s thing test%%\n\n\\\n%%\n"
.byte 0x0
helloworld:
.ascii "Hello World!"
.byte 0xA, 0x0
.equ helloworld_sz, . - helloworld
start_str:
.ascii "\n| START |\n\n\0"
end_str:
.ascii "\n| END |\n\0"
|