Try to use timer

This commit is contained in:
unlockable
2024-07-11 19:55:28 +08:00
parent 86bc0d2a4f
commit da570f3bb4
3 changed files with 47 additions and 0 deletions

19
15test_jal.asm Normal file
View File

@@ -0,0 +1,19 @@
lui $s0, 0x4000
addi $s0, $s0, 0x10
main_loop:
addi $s1, $zero, 0x15b
sw $s1, 0($s0)
jal wait_for_time
addi $s1, $zero, 0x177
sw $s1, 0($s0)
jal wait_for_time
j main_loop
wait_for_time:
lui $t0, 0xf
addi $t0, $t0, 0x7fff
wait_loop:
addi $t0, $t0, -1
bgtz $t0, wait_loop
jr $ra