CSC 6Fh Programming assignment 1 Due Wednesday 2/20/2002 Use MASM to write a program to read in a string and print the string backwards. You may use either interrupt 21h, function 01h to read characters one at a time until return is read (code 0dh), or use function 0Ah, which reads an entire line automatically. For output I recommend function 02h, which prints one char at a time. Consult book and web page for further documentation on using the interrupts. To invoke a certain function for interrupt service 21h, you have to put the function number in register ah, as in: mov ah,01 int 21h This will read in a single char and store it in register al. What if you're using the ax register for another purpose before you need to call the interrupt? You need to save the value of ax somewhere before you use it for the purpose of reading a char: push ax mov ah,01 int 21h pop ax ; ax now restored to original value! You should store the string read into a buffer in the .data section.