0

I have been doing this Marie code and it says it has three errors every time I try to assemble it. I'm unsure on how to go about fixing it. I have tried changing a bunch of things but I still end up with 3 or more errors.
It is telling me instructions are not recognized, Here is where the errors appear, I am very very new to all of this so I am still trying to figure out how it all works, apologies if it is something super simple!
Here is the code and below that will be the image of the errors

    org         100
    input
    store       N       
    input
    store       D       
    load        N       
    store       K
    
Outer,  load        K      
    skipcond    800
    jump        Done   
    load        Incr   
    store       Pow
    load        D      
    store       J

Inner,  load        J       
    add         J
    subt        K
    skipcond    000
    jump        AftIn   
    load        J       
    add         J
    store       J
    load        Pow     
    add         Pow
    store       Pow
    
    jump        Inner   
    
AftIn,  load        K       
    subt        J
    store       K
    load        Answer  
    add         Pow
    store       Answer
            
    jump        Outer   

 Done,   load        K       
    skipcond    000
    jump        Disp
    load        Answer
    subt        Incr
Disp,   load        Answer  
    output
    halt
    
N,      dec         0      
D,      dec         0       
K,      dec         0       
J,      dec         0       
Pow,    dec         0       
Answer, dec         0       
Incr,   dec         1   

enter image description here

I am using a MarieSim JAR application from 2009 to run the code.

greybeard
  • 2,249
  • 8
  • 30
  • 66
TK708
  • 11
  • 3
  • It assembles ok on https://marie.js.org/. What tooling are you using? In any case, looks like it doesn't recognize `SUBT`, maybe try `SUB` instead, or try lower or mixed case (`subt` or `Subt`)?? (Note, marie.js.org doesn't like the space in the 1st column of the `Done,` line.) – Erik Eidt Sep 24 '21 at 20:55
  • Thank you very much! the "subt" change to "sub" worked perfectly! – TK708 Sep 24 '21 at 21:05
  • Please let us know what tooling you're using, for future readers having the same/similar problem. – Erik Eidt Sep 24 '21 at 22:43
  • the program I am using for it just says it is MarieSim, it is a jar file if that helps any, it is also from 2009 if that helps at all to get a scope of what it is exactly – TK708 Sep 25 '21 at 01:12

1 Answers1

1

It seems that the assembler you're using doesn't like SUBT but that the assembly code is otherwise in good shape.  Maybe try SUB instead of SUBT.

Erik Eidt
  • 23,049
  • 2
  • 29
  • 53