MIPS64--14天从入门到放弃(2)
上次搞完了简单的 A+B problem,这次来搞一个更加经典的题目,那就是屏幕输出 Hello,World!,这次我们仅需要搞懂MIPS64是如何进行屏幕输出的即可。
I/O区域的内存映射
Addresses of CONTROL and DATA registers
CONTROL: .word32 0x10000
DATA: .word32 0x10008
Set
CONTROL = 1, Set DATA to Unsigned Integer to be output
Set
CONTROL = 2, Set DATA to Signed Integer to be output
Set CONTROL
= 3, Set DATA to Floating Point to be output
Set
CONTROL = 4, Set DATA to address of string to be output
Set
CONTROL = 5, Set DATA+5 to x coordinate, DATA+4 to y coordinate, and DATA to
RGB colour to be output
Set
CONTROL = 6, Clears the terminal screen
Set
CONTROL = 7, Clears the graphics screen
Set CONTROL
= 8, read the DATA (either an integer or a floating-point) from the keyboard
Set