.text .balign 4 .global _fibo _fibo mov __TMP0,#(3<<4)+13 call #__LMM_PUSHM mov r14, sp sub sp, #4 mov r7, r14 sub r7, #4 wrlong r0, r7 mov r7, r14 sub r7, #4 rdlong r7, r7 cmp r7, #1 wz,wc IF_A brs #.L2 mov r7, r14 sub r7, #4 rdlong r7, r7 brs #.L3 .L2 mov r7, r14 sub r7, #4 rdlong r7, r7 sub r7, #1 mov r0, r7 lcall #_fibo mov r13, r0 mov r7, r14 sub r7, #4 rdlong r7, r7 sub r7, #2 mov r0, r7 lcall #_fibo mov r7, r0 add r7, r13 .L3 mov r0, r7 mov sp, r14 mov __TMP0,#(3<<4)+15 call #__LMM_POPM lret .data .balign 4 .LC0 .ascii "hello, world!\15\0" .balign 4 .LC1 .ascii "fibo(%02d) = \0" .balign 4 .LC2 .ascii "%06d (%05ums) (%u ticks)\12\0" .text .balign 4 .global _main _main mov __TMP0,#(3<<4)+13 call #__LMM_PUSHM mov r14, sp sub sp, #48 mov r7, r14 sub r7, #8 wrlong r0, r7 mov r7, r14 sub r7, #4 wrlong r1, r7 mvi r0,#.LC0 lcall #_puts mov r6, #0 mov r7, r14 sub r7, #32 wrlong r6, r7 brs #.L5 .L6 mvi r7,#.LC1 wrlong r7, sp mov r7, sp add r7, #4 mov r6, r14 sub r6, #32 rdlong r6, r6 wrlong r6, r7 lcall #_printf mov r13, r14 sub r13, #28 lcall #_clock mov r7, r0 wrlong r7, r13 mov r7, r14 sub r7, #32 rdlong r7, r7 mov r0, r7 lcall #_fibo mov r7, r0 mov r6, r14 sub r6, #24 wrlong r7, r6 mov r13, r14 sub r13, #20 lcall #_clock mov r7, r0 wrlong r7, r13 mov r7, r14 sub r7, #16 mov r5, r14 sub r5, #20 mov r6, r14 sub r6, #28 rdlong r5, r5 rdlong r6, r6 mov r4, r5 sub r4, r6 mov r6, r4 wrlong r6, r7 mvi r7,#__clkfreq rdlong r6, r7 mvi r7,#1000 mov r0, r6 mov r1, r7 call #__UDIVSI mov r7, r0 mov r5, r14 sub r5, #12 mov r6, r14 sub r6, #16 rdlong r6, r6 mov r0, r6 mov r1, r7 call #__UDIVSI mov r7, r0 wrlong r7, r5 mvi r7,#.LC2 wrlong r7, sp mov r6, r14 sub r6, #24 mov r7, sp add r7, #4 rdlong r6, r6 wrlong r6, r7 mov r6, r14 sub r6, #12 mov r7, sp add r7, #8 rdlong r6, r6 wrlong r6, r7 mov r6, r14 sub r6, #16 mov r7, sp add r7, #12 rdlong r6, r6 wrlong r6, r7 lcall #_printf mov r7, r14 sub r7, #32 rdlong r7, r7 mov r6, r7 add r6, #1 mov r7, r14 sub r7, #32 wrlong r6, r7 .L5 mov r7, r14 sub r7, #32 rdlong r7, r7 cmps r7, #26 wz,wc IF_BE brs #.L6 .L7 brs #.L7