THE UNIVERSITY OF DODOMA
College Of Informatics and Virtual Education
NAME: Makame, Makame H REGISTRATION No: T/UDOM/2010/00410 PROGRAM: B Sc. Computer and Information Security
ASSIGNMENT NO.1
COURSE NAME: Computer Architecture and Organization COURSE CODE: CN 200 COUSE INSTRUCTOR: Mjahidi
Question: Use MARIE to implement a2-b2=c and should be inserted from the keyboard once, also display your result to the appropriate output device.
Program: a2-b2=c load
a
input
return,
store
a
load
b
add
a
store
b
load
c
add
a
store
c
load
b
subt
one
store
b
skipcond
400
jump
return
load
axa
input
retn,
store
axa
load
bxb
add
axa
store
bxb
load
cxc
add
axa
store
cxc
load
bxb
subt
onex
store
bxb
skipcond
400
jump
retn
load
c
subt
cxc
output halt axa,
dec
0
bxb,
dec
0
cxc,
dec
0
dxd,
dec
0
onex,
dec
1
a,
dec
0
b,
dec
0
c,
dec
0
d,
dec
0
one,
dec
1