yaddresses associated D000 is the console (outp D004 is the console (outp

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

Can u answer number 2 and 3 of part A 

Please I will rate you if answer is correct 

For the purpose of this lab, we are interested in using the ARC simulator to use:
The console output port to display characters
The keyboard input port to read characters
1) Please provide comments for all instructions.
2) What is the memory mapped address for the console output and keyboard input?
3) Please identify the specific line of code that prints to console and reads the
keystroke.
PART A - Output: Printing character to the display
The memory addresses associated wi
the
console output I/O device are:
Oxffff0000 is the console (output) data port
Oxffff0004 is the console (output) status port where bit 7 is the ready flag (0: not
ready, 1: ready)
Printing a character is achieved by:
Checking the ready flag to see if device is ready for printing, i.e., check if the bit 7
of the output status port is set to 1
Storing the character to the output data port
! Prints "Hello, world!\n" in the message area.
.begin
1
BASE
COUT
.equ Ox3fffcO
.equ Ox0
.equ Ox4
!Starting point of the memory mapped region
!Oxffff0000 Console Data Port
!Oxffff0004 Console Status Port
COSTAT
2048
.org
add
%r0, %r0, %r2
%r0, %r0, %r4
sethi BASE, %r4
add
Loop:
Id
[%r2 + String], %r3 !Load next char into r3
addcc %r3,%r0,%r3
End
be
! stop if null
Id
andcc %r1, Ox80, %r1
be
Wait:
[%r4+COSTAT]), %r1
Wait
%r3, [%r4+COUT] !Print to console
%r2, 4, %r2
Loop
st
!increment String offset (r2)
add
ba
End:
halt
!A non-standard instruction to stop the simulator
3000
.org
! The "Hellow, world!" string
String:
Ох48, Ох65, 0хбс, Ох6с, 0х6f
Оx2с, Ох20, Ох77, Ох6f, Ох72
Ох6с, Ох64, Ох21, 0х0а, 0
.end
Transcribed Image Text:For the purpose of this lab, we are interested in using the ARC simulator to use: The console output port to display characters The keyboard input port to read characters 1) Please provide comments for all instructions. 2) What is the memory mapped address for the console output and keyboard input? 3) Please identify the specific line of code that prints to console and reads the keystroke. PART A - Output: Printing character to the display The memory addresses associated wi the console output I/O device are: Oxffff0000 is the console (output) data port Oxffff0004 is the console (output) status port where bit 7 is the ready flag (0: not ready, 1: ready) Printing a character is achieved by: Checking the ready flag to see if device is ready for printing, i.e., check if the bit 7 of the output status port is set to 1 Storing the character to the output data port ! Prints "Hello, world!\n" in the message area. .begin 1 BASE COUT .equ Ox3fffcO .equ Ox0 .equ Ox4 !Starting point of the memory mapped region !Oxffff0000 Console Data Port !Oxffff0004 Console Status Port COSTAT 2048 .org add %r0, %r0, %r2 %r0, %r0, %r4 sethi BASE, %r4 add Loop: Id [%r2 + String], %r3 !Load next char into r3 addcc %r3,%r0,%r3 End be ! stop if null Id andcc %r1, Ox80, %r1 be Wait: [%r4+COSTAT]), %r1 Wait %r3, [%r4+COUT] !Print to console %r2, 4, %r2 Loop st !increment String offset (r2) add ba End: halt !A non-standard instruction to stop the simulator 3000 .org ! The "Hellow, world!" string String: Ох48, Ох65, 0хбс, Ох6с, 0х6f Оx2с, Ох20, Ох77, Ох6f, Ох72 Ох6с, Ох64, Ох21, 0х0а, 0 .end
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps with 5 images

Blurred answer
Knowledge Booster
Fundamentals of Boolean Algebra and Digital Logics
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
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