1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
LuckyWell [14K]
4 years ago
15

Your assignment is to write an assembly language program which read a string and print it in uppercase. This program asks the us

er to enter a string which is subsequently displayed in uppercase. It is important to first ensure that string to be converted is in the a-z range. The program does not recognize any space, symbols or any kind of punctuation marks. Any time the user enters any of this character the program is going to repeatedly ask for the valid string. An example execution of your program could be:________
Computers and Technology
1 answer:
-BARSIC- [3]4 years ago
4 0

Answer:

Check the explanation

Explanation:

.data

prompt: .asciiz "Please enter your string :"

result_str: .asciiz "\nYour captalized string :"

error_prompt: .asciiz "\nInvalid Entry !"

buffer: .space 20

.text

.globl __start

__start:

ASKING_STR:

la $a0,prompt

li $v0,4

syscall

li $v0,8 #take in input

la $a0, buffer #load byte space into address

li $a1, 20 # allot the byte space for string

move $t0,$a0 #save string to t0

syscall

li $v0, 4

li $t0, 0

loop:

lb $t1, buffer($t0)

beq $t1, 0, exit

slti $t2,$t1,91

bne $t2,$0,UPPER_CHECK

slti $t2,$t1,123

bne $t2,$0,LOWER_TO_UPPER

UPPER_CHECK:

slti $t2,$t1,65

bne $t2,$0,INVALID_ENTRY

slti $t2,$t1,90

bne $t2,$0,NEXT

j INVALID_ENTRY

LOWER_TO_UPPER:

sub $t1, $t1, 32

sb $t1, buffer($t0)

NEXT:

addi $t0, $t0, 1

j loop

INVALID_ENTRY:

li $v0, 4

la $a0, error_prompt

syscall

j ASKING_STR

exit:

li $v0, 4

la $a0, result_str

syscall

li $v0, 4

la $a0, buffer

syscall

li $v0, 10

syscall

You might be interested in
Question 8 OT TU
Semenov [28]
The qualities that are generally required are A. Vision
4 0
3 years ago
What is meant by authorization? The decision to allow or deny a subject access to an object. The ability of a subject and an obj
USPshnik [31]

Answer: <em>The ability of a subject and an object to interact.</em>

Explanation:

Authorization is known as or referred to as a security mechanism that is used in order to determine the client/user access or privileges levels that are related to the system resources these mostly tend to include computer services, programs, files, data and other application. Authorization is also referred to as something that is preceded by authentication i.e for individuals identity verification.

6 0
3 years ago
My e m a i l is chur.waifu.koko at g m a i l . c o m<br> E m a i l me, I'm lonely XD (!5 pts each)
skad [1K]

Answer:

Nice email!

Explanation:

5 0
3 years ago
Read 2 more answers
ᗯᕼᗩ丅 ᗩᖇᗴ 丅ᕼᗴ ᑕᗝᗰᑭᗝᑎᗴᑎ丅ᔕ ᗝᖴ ᗩ ᖇᗴᔕᗴᗩᖇᑕᕼ ᑭᒪᗩᑎ? ᑕᕼᗴᑕᛕ ᗩᒪᒪ 丅ᕼᗩ丅 ᗩᑭᑭᒪƳ.
Montano1993 [528]

Hey there!

The answers to your question are as follows:

A.) Goals for the research project

B.) Research topic

D.) Possible sources

F.) Research method

A ~ the goals are important because you want to know why you are doing it. the goals can be good for remembering who your audience is.

B ~ Research topic is important because you want to know what your researching

D ~ Possible sources are important, too, because you want to know how you are going to get your information

F.) a research method is also important because it can help you stay organized

Hope this helps! Good luck! Have a great day!

7 0
3 years ago
What is the value of grade after the segment of code executes int result = 95?
Aleks04 [339]

Answer:

the answer is A

because 80 to 90 is B

so 90 to 100 is A

4 0
3 years ago
Other questions:
  • Task manager is showing an application as “not responding.” what can you do?
    11·1 answer
  • Difference between video game laser and projectile
    9·1 answer
  • How to create a tender statement in database management?
    5·1 answer
  • How do you perceive the importance of Internet?
    6·2 answers
  • Which of the following is a strategy used to enhance communication in a presentation?
    14·1 answer
  • A computer connected to the Internet that asks for data is a(n) ________. Select one: A. server B. client C. aggregator D. surro
    8·1 answer
  • The manager of the Super Supermarket would like to be able to compute the unit price for products sold there. To do this, the pr
    13·1 answer
  • 1. What are the main uses for Protein in the body?
    13·2 answers
  • When creating an html document, what do we use to set aside space for content?.
    13·1 answer
  • What should the Dhruv consider when connecting to the Internet in a public place? Select all that apply.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!