如何从MIPS组件打印到屏幕 [英] How to print to the screen from MIPS assembly

查看:145
本文介绍了如何从MIPS组件打印到屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

.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?

推荐答案

启动代码后,是否在键盘"窗口中单击连接到MIPS"?通过帮助"按钮:

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

重要说明:仅当单击工具的连接到MIPS"按钮(独立版本中的组装并运行")或工具的重置"按钮时,变送器控制器就绪"位才设置为其初始值1!如果运行MIPS程序并在MARS中将其复位,则控制器的就绪"位将清除为0!配置数据段窗口"以显示MMIO地址范围,以便您可以直接观察存储在上面给定MMIO地址中的值.

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.

这篇关于如何从MIPS组件打印到屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆