Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

18. (4 pts) Suppose you want to send a string in code memory to the serial port. The strategy is to have a subroutine called

18. (4 pts) Suppose you want to send a string in code memory to the serial port. The strategy is to have a subroutine called send string (below) that writes the first character to SBUF and to have the serial port ISR send the rest. You may assume dptr is used for this purpose and nothing else. Also, you may assume send string will not be called again until the string is completely transmitted. Write an interrupt service routine in the assembly that sends the remaining characters in the string. Have the ISR stop (i.e. clear TI as usual but do not send anything to SBUF) when it encounters a zero. Don't forget to restore any registers (e.g. accumulator) that the ISR alters. send_string: clr a movc a, @a+dptr jz null_string mov sbuf, a null_string: ret

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Databases On The Web Learn To Create Web Pages That Interface With Database Engines

Authors: Robert Papaj, Donald Burleson

11th Edition

1576100995, 978-1576100998

More Books

Students also viewed these Databases questions