MARIE Assembly Language Programming Lab Report
MARIE Assembly Language Programming Lab Report
430185500
Background Information
MARIE has a simple and powerful instruction set. Each instruction for
MARIE has 16 bits. The bits 12-15 are the most significant because they
make up the opcode that determines the instruction to be executed. The
other 12 bits (0-11) make an address. The table below showcases MARIEs
instruction set.
Num2
Count
800
Inver2
430185500
Iter
S1P
Invert
Result
One
Result
430185500
Num1,
Num2,
Result,
Count,
Dec
Dec
Dec
Dec
65000
4
0
0
/Number 1 to multiply
/Number 2 to multiply
/Result to store
/Keeps track of ammount of iterate times
One,
Dec
/Holds number 1
Invert,
Dec
Iter,
Dec
/Itererator
Temp,
Dec
Summary Chapter 2
Exercise two of the lab involved transforming the Program below to RTN.
MAR Num2
MBR M[MAR]
AC MBR
/Load Num2
MAR Count
MBR M[MAR]
AC AC MBR
/Subt Count
/Skipcond 400
If IR[11-10] = 01 then
If AC = 0 then PC PC + 1
PC LoopS1
/Jump LoopS1
/Halt
MAR Result
MBR M[MAR]
AC MBR
/Load Result
430185500
/Add Num1
/Store Result
MAR Result, MBR AC
M[MAR] MBR
MAR Count
MBR M[MAR]
AC MBR
/Load Count
MAR One
MBR M[MAR]
AC AC + MBR
/Add One
/Store Count
MAR Count, MBR AC
M[MAR] MBR
PC S1P
/Jump S1P