Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started