Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

LC3 lower case to uppercase. The program is supposed to take a person's initials and output them as uppercase. Is it possible to get the

LC3 lower case to uppercase. The program is supposed to take a person's initials and output them as uppercase. Is it possible to get the program to look like this:

Type your first, middle, and last initial in lowercase> abc

The first initial is> A

The first initial is> B

The first initial is> C

(What I have so far)

.ORIG x3000

LEA R0,PROMPT1 ; Displays first prompt.

PUTS

GETC ; Reads char

OUT ; Output a character to the monitor

ST R0,CHAR ; Safe keeps char.

LD R0,CRLF ; Executes new line.

OUT ; Writes char

LEA R0,PROMPT2 ; Displays second prompt.

PUTS

LD R0,CHAR ; Reload char

LD R1,NEG32

ADD R0,R0,R1

OUT ; Displays uppercase.

GETC ; Reads char

ST R0,CHAR ; Safe keeps char.

LD R0,CRLF ; Executes new line.

OUT ; Writes char

LEA R0,PROMPT3 ; Displays second prompt.

PUTS

LD R0,CHAR ; Reload char

LD R1,NEG32

ADD R0,R0,R1

OUT ; Displays uppercase.

GETC ; Reads char

ST R0,CHAR ; Safe keeps char.

LD R0,CRLF ; Executes new line.

OUT ; Writes char

LEA R0,PROMPT4 ; Displays second prompt.

PUTS

LD R0,CHAR ; Reload char

LD R1,NEG32

ADD R0,R0,R1

OUT ; Displays uppercase.

HALT

;************ Data area*******************************

PROMPT1 .STRINGZ "Type your first, middle, and last initial in lowercase> "

PROMPT2 .STRINGZ "The first initial is> "

PROMPT3 .STRINGZ "The middle initial is> "

PROMPT4 .STRINGZ "The last initial is> "

CHAR .BLKW 3

NEG32 .FILL #-32

CRLF .FILL #10

.END

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

Oracle Database 10g Insider Solutions

Authors: Arun R. Kumar, John Kanagaraj, Richard Stroupe

1st Edition

0672327910, 978-0672327919

Students also viewed these Databases questions

Question

1. Contrast medical and economic decision making.

Answered: 1 week ago

Question

Differentiate tan(7x+9x-2.5)

Answered: 1 week ago

Question

Explain the sources of recruitment.

Answered: 1 week ago

Question

Differentiate sin(5x+2)

Answered: 1 week ago

Question

Compute the derivative f(x)=1/ax+bx

Answered: 1 week ago