【发布时间】:2018-11-15 06:52:05
【问题描述】:
我从一个不再可用的站点下载了 MARIE 模拟器,并编写了一个小程序,它只声明一组十六进制数字,然后尝试使用该地址检索其中一个数字。
问题在于汇编程序抱怨loadi 不是一个可识别的指令。如果我使用load 而不是loadi,它将组装并运行并打印预期的输出(我想要的值的地址)。
我相信loadi 应该可以工作并且是我需要的指令,因为我之前对它的理解是它将加载在操作数给出的地址处找到的值,以及我在网站上找到的一些文档,如this one 和 this one。
为什么loadi 无法识别?难道我做错了什么?也许有不同版本的 MARIE 对某些指令的支持不同?
我的玛丽密码:
ORG 0
JUMP start
BADDR, hex 0003 / Date_B = 0003
EADDR, hex 001A / Date_E = 001A
/ data section begins
Data_B, hex 0102 / data begin address 3
hex 0105 / dec 261
hex 0106 / dec 262
hex 0108 / dec 264
hex 011A / dec 282
hex 0120 / dec 288
hex 0225 / dec 549
hex 0230 / dec 560 10
hex 0231 / dec 561
hex 0238 / dec 568
hex 0339 / dec 825
hex 0350 / dec 848
hex 0459 / dec 1113 000F
hex 055F / dec 1375
hex 066A / dec 1642
hex 0790
hex 08AB
hex 09AF
hex 0AB9
hex 0BBD
hex 0CC1
hex 0DCA
hex 0EFE / 0019
Data_E, hex 0FFE / data end address 001A
Count, dec 24 / the number of data
start, loadi mid
output
halt
mid, hex 000F / starting mid point
【问题讨论】:
标签: memory-access marie