Consider the following program in MARIE assembly language. a) Complete the table detailing the RTN for next 2 instructions only that will be executed including the content of registers PC, IR, MAR, MBR and AC in hexadecimal. Note the first instruction LOAD X is already filled. Note also that SKIPCOND instruction has no operands, therefore you can complete Fetch, decode and execute cycles only. b) Explain in one statement the task performed by this program?

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Consider the following program in MARIE assembly language. a) Complete the table detailing
the RTN for next 2 instructions only that will be executed including the content of registers PC,
IR, MAR, MBR and AC in hexadecimal. Note the first instruction LOAD X is already filled. Note
also that SKIPCOND instruction has no operands, therefore you can complete Fetch, decode and
execute cycles only. b) Explain in one statement the task performed by this program?

2. Consider the following program in MARIE assembly language. a) Complete the table detailing
the RTN for next 2 instructions only that will be executed including the content of registers PC,
IR, MAR, MBR and AC in hexadecimal. Note the first instruction LOAD X is already filled. Note
also that SKIPCOND instruction has no operands, therefore you can complete Fetch, decode and
execute cycles only. b) Explain in one statement the task performed by this program?
LOAD X
/ AC = X
Repeat, SKIPCOND 800
JUMP End
/ if AC > 0 then PC = PC + 1 (skip)
/ Go to End
SUBT One
/ AC = ÁC - 1
STORE X
= AC
JUMP Repeat
| Go to Repeat
STORE X
End,
HALT
/ Stop (end of program)
X,
One,
DEC 10
DEC 1
label
opcode
|operand
hex
1007
AC
0000
...
OUTPUT
000
LOAD
O 001
Repeat
SKIPCOND 800
8800
O 002
JUMP
End
9006
IR
0000
003
SUBT
One
4008
004
JUMP
Repeat
9001
MAR
000
O 005
STORE
X
2007
O 006
End
HALT
7000
MBR
0000
O 007
DEC
10
000A
008
One
DEC
1
0001
PC
000
Control
INP..
+0+
+1
+2
+3
+4
+5
+6
+7
+8
+9
+A
+B
+C
+D
+E
+F
000 1007 8800 9006 4008 9001 2007 7000 000A 0001 0000 0000
010 0000 0000 0000 0000 0000 0000 0000 0000 0000 000
020 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000
0000
0000 0000 0000 0000 0000
0000
0000
0000
030 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
040 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
050 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
060 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
070 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000
080 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
Transcribed Image Text:2. Consider the following program in MARIE assembly language. a) Complete the table detailing the RTN for next 2 instructions only that will be executed including the content of registers PC, IR, MAR, MBR and AC in hexadecimal. Note the first instruction LOAD X is already filled. Note also that SKIPCOND instruction has no operands, therefore you can complete Fetch, decode and execute cycles only. b) Explain in one statement the task performed by this program? LOAD X / AC = X Repeat, SKIPCOND 800 JUMP End / if AC > 0 then PC = PC + 1 (skip) / Go to End SUBT One / AC = ÁC - 1 STORE X = AC JUMP Repeat | Go to Repeat STORE X End, HALT / Stop (end of program) X, One, DEC 10 DEC 1 label opcode |operand hex 1007 AC 0000 ... OUTPUT 000 LOAD O 001 Repeat SKIPCOND 800 8800 O 002 JUMP End 9006 IR 0000 003 SUBT One 4008 004 JUMP Repeat 9001 MAR 000 O 005 STORE X 2007 O 006 End HALT 7000 MBR 0000 O 007 DEC 10 000A 008 One DEC 1 0001 PC 000 Control INP.. +0+ +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F 000 1007 8800 9006 4008 9001 2007 7000 000A 0001 0000 0000 010 0000 0000 0000 0000 0000 0000 0000 0000 0000 000 020 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 030 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 040 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 050 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 060 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 070 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 080 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Fundamentals of Computer System
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education