Sun, 8 Feb 2009, 03:40
A student writes: Hey Dr. Patt! Hey Student!! My lab partner and I were just reading the notes on lab 1 assignment and we wanted to ask about TRAP. "Just reading" - the night before it is due? :-( It says that other TRAP commands like GETC,IN,OUT,PUTS,etc do not have to be recognized by the assembler. What it is saying is that the Assembler needs to recognize the assembly language statement HALT, but not the assembly language statements GETC, IN, OUT, PUTS, etc. On that note, I was wondering if the assembler still needed to recognize TRAPs in the form of TRAP x19, TRAP x23, etc. Absolutely. So, for example, none of our test programs will contain PUTS, but may certainly contain TRAP x22. Also, our test programs may contain HALT and may also contain TRAP x25. I decided not to require you to recognize GETC, IN, etc. to save you some tedium. Thanks very much for your help! <<name withheld to protect the first student to find this ambiguous>> Good luck finishing the lab tonight (Sunday). Yale Patt