;; .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"