I'm trying to create a calculator in MARIE Assembly Language. After some brain storming, I have addition, subtraction, and multiplication codes. I'm completely new to this language and would like to get some help on how to get started. Any help will be appreciated. Thanks

ORG 100 /Start
Input
Store A
Input
Store B
Load A /Put Number A into AC
Subt B /Substract from AC
Store Sum /Save sum
Output
Halt /End program
A, Dec 0 / values
B, Dec 0 / values
Sum, Dec 0 / Result, initially 0 overwritten by code
END


ORG 100 /Start
Input
Store A
Input
Store B
Load A /Put Number A into AC
ADD B /Add from AC
Store Sum /Save sum
Output
Halt /End program
A, Dec 0 / values
B, Dec 0 / values
Sum, Dec 0 / Result, initially 0 overwritten by code
END

Input /Input A value
Store A
Input /Input B value
Store B
Loop, Load B
Skipcond 800 If AC > 0, continue loop
Jump Endloop
Subt One
Store B
Load C
Add A
Store C
Jump Loop
Endloop, Load C
Output
Halt
C, DEC 0
A, DEC 0
B, DEC 0
One, DEC 1

ORG 100
Load One
Store X
Loop, Load X
Subt Ten
SkipCond 000
Jump Endloop
Add X
Store Sum
Load X
Add One
Store X
Jump Loop
Endloop,Load Sum
Output
Halt
Sum, Dec 0
X, Dec 0
One, Dec 1
Ten, Dec 10
END

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.