Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

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. "

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote