How to print to the screen from MIPS assembly

☆樱花仙子☆ 提交于 2019-12-11 07:28:40

问题


.text
emitchar:   

lui $t0,0xffff
polling:
lw  $t1,8($t0)  
andi    $t1,$t1,0x0001
beq $t1,$zero,polling
sw  $a0,0xc($t0)    

.data

I was told this is how to do it but when I run the simulator with the display and keyboard add in I still get not output on the screen. What am I doing wrong?


回答1:


Did you click "Connect to MIPS" in the Keyboard window after starting your code? From the Help button:

IMPORTANT NOTE: The Transmitter Controller Ready bit is set to its initial value of 1 only when you click the tool's 'Connect to MIPS' button ('Assemble and Run' in the stand-alone version) or the tool's Reset button! If you run a MIPS program and reset it in MARS, the controller's Ready bit is cleared to 0! Configure the Data Segment Window to display the MMIO address range so you can directly observe values stored in the MMIO addresses given above.



来源:https://stackoverflow.com/questions/10325970/how-to-print-to-the-screen-from-mips-assembly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!