[英]MARIE assembler - how to multiply
I want to write a simple MARIE program to evaluate the expression A x B + C x D
. 我想编写一个简单的MARIE程序来评估表达式
A x B + C x D
Now, there's not alot of info on Marie assembly language. 现在,关于Marie汇编语言的信息不多。 I am not sure if there is a multiply?
我不确定是否有乘法? If not, would I have to loop or something to get it to multiply?
如果没有,我是否必须循环播放或进行其他运算以使其倍增? I know for certain operators like
<
, >
you would subtract. 我知道对于某些运算符,例如
<
, >
您会减去。
This is what I have so far: 这是我到目前为止的内容:
100 load A
101 load B
102 add C // add to B? b+c?
103 mult A
I'm just stuck. 我只是被困住了。
Do I suppose you refer to this? 我想你会提到这个吗?
http://www.cse.yorku.ca/~jeff/notes/compiler/Marie/ http://www.cse.yorku.ca/~jeff/notes/compiler/Marie/
You can access to a list of opcodes in the editor (File>>Edit), Help>>Help. 您可以在编辑器(文件>>编辑),帮助>>帮助中访问操作码列表。 There is no mult opcode, so you'll have to create a loop and use skipcond in order to test the condition.
没有多操作码,因此您必须创建一个循环并使用skipcond来测试条件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.