Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In this question, you may invent your own instruction set as long as it is reasonable for your program. You should comment your program properly,
In this question, you may invent your own instruction set as long as it is reasonable
for your program. You should comment your program properly, so that it can be
easily understood.
a Write an assembly language function to convert an integer into two single
digit decimal values. For example, if input is then output is and and if
input is then output is and You can design your calling convention ie
where are the input and output parameters for this function. Also, assume there
is NO division operation in the instruction set. No error checking on the input is
needed.
b Consider a scale with LED display that can measure up to There are two
IO ports, one for reading the weight of the object while the other is
to control two LED displays, each of which can display a single digit from to
The scale has a Control and Status Register SCSR and a buffer register SBR
The buffer register is to return the weight of the object.
The SCSR has the following format:
Bit Ready Bit, the scale is ready
Bit weight of the object been read and stored in SBR
will be automatically cleared after SBR read
Bit Set this bit to start reading the scale.
Bit Scale error
The two LED display is controlled by two LED buffer registers LEDBR and
LEDBR To write to the LED, just write a value between and to LEDBR
and LEDBR If the value is written, a hyphen will be displayed.
LEDBR the value of the digit to be displayed on the right LED.
LEDBR the value of the digit to be displayed on the left LED.
Write an assembly language program that use Programmed to read the scale
and display the value on the two LEDs. If error is returned from the scale, display
two hyphens You may assume the function in part a is available.
ci When does the CPU check interrupt in the instruction execution cycle?
Why?
ii What is DMA? Explain how the DMA controller can access the memory
without conflict with the CPU.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started