Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

9th Edition

B01JXPZ7AK, 9780805360479

More Books

Students also viewed these Databases questions

Question

using signal flow graph

Answered: 1 week ago

Question

=+ d. a professor deciding how much to prepare for class

Answered: 1 week ago