Question: Objectives In this lab, you will learn to implement: 1. an if/else statement 2. a while loop Exercise 1: if/else statements Write an LC-3 assembly

Objectives In this lab, you will learn to implement: 1. an if/else statement 2. a while loop Exercise 1: if/else statements Write an LC-3 assembly program that does the following. Read a character from the keyboard using getc (Trap x20) and display it in the output window using out (Trap x21). Read a second character from the keyboard using getc and display it in the output window using out. Display the smaller of the two characters along with an appropriate message in the output window. Display a termination message before halting the program. If the first character is a and the second character is x then the output from the program should be similar to: Enter any character: a Enter any character: x The smaller of the two characters is a Programmed by Stew Dent End of processing
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
