; ###----------------------------------------------------------------### ; # file : it006.u # ; # date : Mar 26 1996 # ; # descr. : functional test for mips # ; ###----------------------------------------------------------------### ; ###--------------------------------------------------------### ; # decrementation loop (with a hardware interrupt) # ; ###--------------------------------------------------------### timer_0 .equ 0x40000100 timer_1 .equ 0x40000104 timer_2 .equ 0x40000108 timer_3 .equ 0x4000010C timer_4 .equ 0x40000110 timer_5 .equ 0x40000114 timer_rst .equ 0x40000118 timer_sts .equ 0x4000011C timer_rst0 .equ 0x4000000C timer_sts0 .equ 0x40000008 value .equ 0x0008 v_sts .equ 0x0040 .org 0x00400000 .start init init: loadi r31, back_from_int loadi r1 , timer_rst addiu r2 , r0 , value sw r2, 0(r1) loadi r1 , timer_sts addiu r2 , r0 , v_sts sw r2, 0(r1) addiu r10, r0 , 0x0001 lui r20, 0xffff addiu r16, r0, 0xffaa or r20, r20, r16 loop: addu r20,r10,r20 bne r20,r0, loop nop loadi r9 , timer_sts0 loadi r8,0 sw r8, 0(r9) j bad nop back_from_int: j good nop .org 0x004000d0 good: j good nop bad: j bad nop .end