memory - MIPS 内存映射 IO 接收字节导致错误
问题描述
对于大学,我尝试使用内存映射 IO 将 6 个字符存储在缓冲区中,然后打印缓冲区。下面的代码是接收者,$t0 是接收者的地址。它检查接收器是否准备好,如果准备好接收数据。现在我只是试图确保我得到数据。所以我试图打印它,但我收到一个语法错误,我不知道为什么。
我认为原因可能是接收到的字节不兼容。
lw $t1, 0($t0) # receiver control
andi $t1, $t1,0x0001 # check if ready
beq $t1, $zero,readloop # if not ready
lb $s0, 4($t0) # receiver data
li $v0, 11 # print char
li $a0, $s0 # takes address of string as argument <--- This is where the compiler is saying theres a syntax error
syscall
解决方案
推荐阅读
- javascript - React Route 获取多个 URL
- typescript - 在 TypeScript 中将 Firestore 文档引用转换为 JSON 数据
- python - 为什么 sklearns 分类报告的“加权”平均 F1 分数与公式计算的 F1 分数不同?
- python - Ubuntu 升级到 18.04 后 Anaconda 找不到任何模块
- encryption - MariaDB TDE - 如何加密错误日志文件?
- python - 使用参数模拟 python 实例方法或调用原始方法
- phpunit - 在 PHPUnit 10 中模拟不存在的类
- python - Selenium:“握手失败……”
- windows - 如何将 UTC 日期时间转换为指定的时区?
- java - 当类实现 Callable 接口时,Spring Env 为 null