

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Professor: Linard; Class: MACHINE ORG&ASSEMBLY LANG PRGRM; Subject: Computer Science; University: University of California-Riverside; Term: Fall 2004;
Typology: Assignments
1 / 2
This page cannot be seen from the preview
Don't miss anything!


Experiment with TRAP x20 (GETC) and TRAP x21 (OUT) to make sure you understand exactly how they work. Note that the LC-3 stores ASCII characters as the lower byte of a 2-byte word. Study the ASCII table carefully to understand how to convert between the ASCII binary representation of the numerical symbol '9' (0011 1001) and the actual binary number equivalent to decimal 9 (0000 1001). How will you display the result if it is negative? To get the display cursor to move to a new line, output the newline character CR/LF = ASCII x0A
Grading policy: Possible points: 10 FROM NOW ON, IF YOUR CODE DOES NOT ASSEMBLE IT WILL NOT BE GRADED – i.e. YOUR SCORE WILL BE 0 Well commented code: 2 Correct use of TRAPs 2 Correct ASCII – binary conversion 2 Correct 2’s complement operations 2 Correct output 2 Assignment submitted without name and SSN: - 5 points (if we can figure out who you are!)