I wrote this simple program in MIPS assembly:
.data
.text
main:
li $v0, 12 # read_char
syscall
move $a0, $v0
li $v0, 11 # print_char
syscall
j main # repeat forever
When I run it in QtSpim it works correctly: it takes a character from the console and it prints it as soon as it is entered, then repeats. QtSpim's console, though, doesn't allow me to paste the input for my program (I can do it, but it won't be read). So I tried running it in spim for Linux (command line), version 9.1.8. It works, but it doesn't react immediately when a character is entered; it always waits for a newline, even when entering characters without cut and paste. So I expect this behavior:
(spim) load "echo.asm"
(spim) run
hheelllloo
but I get this one instead:
(spim) load "echo.asm"
(spim) run
hello [I press Enter here]
hello
Any ideas? Thanks in advance.