WinMips64 doesn't appear to use syscall
for terminal output like SPIM / MARS, but rather implements it using memory-mapped I/O (see this example code).
The CONTROL
port is located at address 0x10000
, and the DATA
port at address 0x10008
.
Since you're printing integers you'll be interested mainly in these two output modes:
; Set CONTROL = 1, Set DATA to Unsigned Integer to be output
; Set CONTROL = 2, Set DATA to Signed Integer to be output
For example:
ori $a1,$0,0
lui $a1,1 ; $a1 = 0x10000 (CONTROL)
ori $a2,$a1,8 ; $a2 = 0x10008 (DATA)
lwu $a0,($t1) ; load an unsigned 32-bit value
ori $v0,$0,1 ; 1 == print unsigned integer
sd $a0, ($a2) ; set value to print
sd $v0, ($a1) ; ..and write the command to print it