Basically, I'm using syscall 100 in MIPS, and I'm trying to program a game at the moment. I have this code below to check user input:
getInput:
#===================================================================
addi $v0, $zero, 0
lui $t8, 0xffff
lw $t7, 0($t8)
andi $t7,$t7,1
beq $t7, $zero, getInput1
lw $v0, 4($t8)
getInput1:
jr $ra
Now, I want to check what key the user has pressed and perform an action (won't go into details about it here) immediately, without the user pressing enter. Also, the input is in ascii format, and me using bne or beq to check with an integer won't work because they are different formats.
So far, I have:
li $v0, 100
li $a0, drwho #drwho is the object i'm moving on the game screen
jal getInput
Any idea how to immediately get and perform an action based on the user input?