c++assemblymarie

MARIE assembler - how to multiply


I want to write a simple M.A.R.I.E. program to evaluate the expression A x B + C x D.

Now, there's not alot of info on Marie assembly language. 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.


Solution

  • Do I suppose you refer to this?

    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.