I'm trying to create a MARIE program that raises a number (x) to a power (y) and provides an output. I have tried many alterations of the idea I have in mind but I am still facing errors. The code below is the closest I have gotten to solving this problem
INPUT
STORE X
STORE XNUM
INPUT
STORE Y
MULTIPLIERA,LOAD PROD
ADD X
STORE PROD
LOAD XNUM
SUBT ONE
STORE XNUM
SKIPCOND 400
JUMP MULTIPLIERA
JUMP NEWPRODUCT
NEWPRODUCT, LOAD X
STORE XNUM
LOAD PROD
STORE X
LOAD Y
SUBT ONE
STORE Y
SKIPCOND 400
JUMP MULTIPLIERA
LOAD PROD
OUTPUT
HALT
X, DEC 00
XNUM, DEC 00
Y, DEC 00
ONE, DEC 01
PROD, DEC 00
3^2 gives me a 36 and 1^3 gives me a 4