
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Write a RISC-style
Use the following code as guidance:
![Move
MoveByte
READ: LoadByte
And
ECHO:
Branch_if_[R4]=0
LoadByte
StoreByte
Add
LoadByte
And
Branch_if_[R4]=0
StoreByte
R2, #LOC
R3, #CR
R4, KBD_STATUS
R4, R4, #2
READ
R5, KBD_DATA
R5, (R2)
R2, R2, #1
R4, DISP_STATUS
R4, R4, #4
ECHO
R5, DISP_DATA
Branch_if_[R5] [R3] READ
Initialize pointer register R2 to point to the
address of the first location in main memory
where the characters are to be stored.
Load ASCII code for Carriage Return into R3.
Wait for a character to be entered.
Check the KIN flag.
Read the character from KBD_DATA
(this clears KIN to 0).
Write the character into the main memory and
increment the pointer to main memory.
Wait for the display to become ready.
Check the DOUT flag.
Move the character just read to the display
buffer register (this clears DOUT to 0).
Check if the character just read is the
Carriage Return. If it is not, then
branch back and read another character.](https://content.bartleby.com/qna-images/question/4eda318d-c580-436b-87af-6343b1fc49df/5fd9409e-adcb-4e1a-90d5-bd8888cb769e/utud9a_thumbnail.png)
Transcribed Image Text:Move
MoveByte
READ: LoadByte
And
ECHO:
Branch_if_[R4]=0
LoadByte
StoreByte
Add
LoadByte
And
Branch_if_[R4]=0
StoreByte
R2, #LOC
R3, #CR
R4, KBD_STATUS
R4, R4, #2
READ
R5, KBD_DATA
R5, (R2)
R2, R2, #1
R4, DISP_STATUS
R4, R4, #4
ECHO
R5, DISP_DATA
Branch_if_[R5] [R3] READ
Initialize pointer register R2 to point to the
address of the first location in main memory
where the characters are to be stored.
Load ASCII code for Carriage Return into R3.
Wait for a character to be entered.
Check the KIN flag.
Read the character from KBD_DATA
(this clears KIN to 0).
Write the character into the main memory and
increment the pointer to main memory.
Wait for the display to become ready.
Check the DOUT flag.
Move the character just read to the display
buffer register (this clears DOUT to 0).
Check if the character just read is the
Carriage Return. If it is not, then
branch back and read another character.
Expert Solution

arrow_forward
Step 1: Algorithm:
- Start.
- Initialize pointer R2 to point to the user's name buffer.
- Load the ASCII code for Carriage Return into R3.
- Display a prompt to enter the user's name.
- Enter a loop to read characters from the keyboard until a Carriage Return is encountered.
- Read a character from the keyboard, store it in memory, and display it.
- Repeat step 5 until a Carriage Return is entered.
- Display the entered characters on the screen.
- End the program.
Step by stepSolved in 4 steps with 1 images

Knowledge Booster
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
- Which Direction flag setting causes index registers to go backwards across memory when string primitives are executed?arrow_forwardWrite structured pseudocode that gives instructions to have the user enter 10 numbers, but after each number is entered, the sum of the numbers entered up to that point should be displayed. Then after the last number is entered and the last sum is displayed, the average of the 10 numbers should be displayed.arrow_forwardOutput buffering makes your program slower True Falsearrow_forward
- 6. In 8085 language write a program to find the sum of the numbers 10H, AlH, and the sum should be stored in the Accumulator. Use sim8085 simulator to run the code and attach the screenshot of Accumulator content.arrow_forwardIn Assembly language SPIM I need to make a program that will prompt user for the (x, y) coordinates of two points in the real (Cartesian) plane, and then calculates and displays the distance between the points with reasonable descriptive text. I need to prompt for the coordinates using a little subroutine using simple linkage wich isnt so simple for mearrow_forwardWrite a subroutine that takes one temperature in Celsius and convert it to Fahrenheit using the approximate formula f= + 32. %3D The main routine, in a loop, prompts the user for a value of a temperature and prints out the result. End the loop when the user enters an integer out of the range of -50, 50.arrow_forward
- Q3: Area of a circle Write a MIPS32 Assembly program that prompts the user for the radius of a circle. Calculate and display the circle's area. Use the syscall procedures to read and print floats. Use Pl as : 3.14159265359arrow_forwardswitch is an example of A. keyword B. comment C. preprocessor directive D. statementarrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

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)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education