Question: Part A: IF/ELSE Write an LC-3 assembly language program that does the following: 1. Display the prompt Enter any character: 2. Read a character from


Part A: IF/ELSE Write an LC-3 assembly language program that does the following: 1. Display the prompt "Enter any character: 2. Read a character from the keyboard using getc (Trap x20) 3. Display the character to the console window using out (Trap x21). 4. If the three least significant bits of the ASCII representation of the character are 101 use puts to display the message "The character ends with 101." 5. Otherwise if the two least significant bits of the ASCII representation of the character are 01 use puts to display the message "The character ends with 01." 6. Display a termination message that includes your name before halting the program. If the character is 5 then the output from the program should look like: w Enter any character: 5 The character ends with 101. Programmed by Stew Dent. End of processing. If the character is A then the output from the program should look like: Enter any character: A The character ends with 01. Programmed by Stew Dent. 4/View?ou=403501 If the character is 5 then the output from the program should look like: Enter any character: 5 The character ends with 101. Programmed by Stew Dent. End of processing. If the character is A then the output from the program should look like: Enter any character: A The character ends with 01. Programmed by Stew Dent. End of processing. If the character is b then the output from the program should look like: Enter any character: b Programmed by Stew Dent. End of processing. Page 4 of 5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
