Spring 2001 CSCI 255 Homework 9

You must show your work to receive full credit. This assignment is due Monday, 9 April.

Problem 1

Write a trap routine, number x40, that drains the keyboard input. This routine should use the keyboard status and data registers to read all input characters until it reads an EOT, End-of-Transmssion, represented in ASCII with the binary value 4. Your TRAP routine should not echo any input characters.

Problem 2

Write a little bit of assembly code that uses the stack to evaluate the following C-expression. You may assumes that variables A, B, and C have all been defined and will reside on the same memory page as the code you write. You may use the POP and PUSH subroutines of section 10.2.1.