(This problem is suitable for use as a laboratory experiment.) Given a video terminal connected to the...
Question:
(This problem is suitable for use as a laboratory experiment.) Given a video terminal connected to the computer in your laboratory, complete the following two assignments.
(a) Write an I/O routine A that prints letters in alphabetical order. It prints two lines as follows, and then stops: ABC...YZ ABC... YZ
(b) Write an I/O routine B that prints the numeric characters 0 through 9 in increasing order three times. Its output should have the following format: 012...9012...9012...9 Use program A as the main program and program B as an interrupt-service routine whose execution is initiated by entering any character on the keyboard. Execution of program B can also be interrupted by entering another character on the keyboard. When program B is completed, execution of the most recently interrupted program should be resumed at the point of interruption. Program B should start a new line as appropriate so that the printed output may appear as follows:
To start a new line, the program needs to send two characters: CR (OD 16) and LF (0A16). Show how you can use the processor priority to either enable or inhibit interrupt nesting.
Step by Step Answer:
Computer Organization
ISBN: 9780072320862
5th Edition
Authors: V Carl Hamacher, Carl Hamacher, Zvonko G Vranesic, Safwat G Zaky