Create a timer program IN ASSEMBLY LANGUAGE that will output a timed statement o
ID: 3767161 • Letter: C
Question
Create a timer program IN ASSEMBLY LANGUAGE that will output a timed statement of a number of seconds. That is, it will put out a phrase “X seconds,” for an interval from one to thirty seconds. It should time the interval 20 times, then stop. For example, if you want to time 5 second intervals, the program would let you input a 5, then time 5 seconds twenty times, outputting the statement “5 seconds” every five seconds for twenty intervals. Then it would automatically stop. This means that you need to come up with a countdown time for seconds. In my computer, a countdown from 200,000 produces a 1-second interval, so you need only multiply the number of seconds desired by 200,000 to get the correct interval. Make sure to output a CR/LF between outputs for neatness. You may need to experiment a bit to come up with the number that will produce a 1-second interval, as every computer system is a bit different.
Explanation / Answer
.text
main:
.data
num: .word 0
secs: .asciiz " secs. "
ldr: .asciiz "Input number of seconds. "
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.