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
Three positive impacts of computer technology in our society.​
Contact [7]

Explanation:

1. it has resulted into the manufacturing of vehicles , trains etc

2. 9through computer technology satellites have been invented to boost education through the use of Internet

3. it has improved agriculture by manufacturing machinery such as tractors, ploughs etc

7 0
2 years ago
Read 2 more answers
Find the ratio of 24 to 36​
miv72 [106K]

Answer:

24:36 if you want it in the smallest form it is 2:3

4 0
3 years ago
Read 2 more answers
Question 3
goldfiish [28.3K]

Answer: Zero is output.

8 0
3 years ago
Which of the following statements is true of subroutines? Check all that apply.
erica [24]
I believe it’s the first answer

“They can be used in multiple places “

But I’m not sure!!
6 0
3 years ago
Read 2 more answers
An authenticated user can add up to how many computer accounts to the domain, by default
Brums [2.3K]
By default, 10 computers can be joined to the domain by both users and administrators. As long as a user is authenticated against the Active Directory, he or she can add up to 10 computers to the domain.
While this one posses as an advantage for smaller companies, it is not a desirable feature for bigger companies since they have to control more tightly who can add machines to their domain.
7 0
4 years ago
Other questions:
  • After unit and integration testing are completed, _________ testing ensures that all hardware and software components work toget
    7·1 answer
  • You receive a file named Project4.xlsx as an attachment to an email message. What do you expect the file to contain?
    8·1 answer
  • Which law was established to prevent law enforcement agencies from accessing communication through telephone and digital mediums
    8·2 answers
  • Convert 1001101012 to base 10
    5·1 answer
  • Type the correct answer in the box.
    15·1 answer
  • A television advertisement claiming that a product is "light-years ahead of its time" does not make sense because (a) it doesn’t
    10·1 answer
  • Addison, Inc. uses a perpetual inventory system. Below is information about one inventory item for the month of September. Use t
    15·1 answer
  • Give three reasons why you think ETL functions are mostchallenging in data warehouse environment.
    13·1 answer
  • In what country was the English royal family and nobility living before the Restoration?
    6·1 answer
  • Please help!
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!