In assembly programming, assume a series of bytes is stored in memory locations
ID: 3682742 • Letter: I
Question
In assembly programming, assume a series of bytes is stored in memory locations starting at address $1000. The number of bytes in this series is unknown. However, the last byte of the series has a value of $DD. Write a small program and a subroutine for determining the number of bytes that are present in this series. Do not count the last byte i.e., $DD. Store the total number of bytes found in the series at memory address $0000. Document the subroutine’s details using all applicable in-line and full line comments
Explanation / Answer
Mov R0,$1000
Mov R1,$DD
LOOP: MOV ax, @R0
MOV @R1, bx
end LOOP
STOP: SJMP STOP
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.