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]
3 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]3 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
Which payment method typically charges the highest interest rates
mixer [17]
Credit cards do charge the most interest
5 0
2 years ago
You and your friend who lives far away want to fairly and randomly select which of the two of you will travel to the other’s hom
Phantasy [73]

Answer:

c. your friend can hash all possible options and discover your secret.

Explanation:

SHA-256 is a set of hash functions that was designed by the NSA. SHA-2 is considered an upgrade on the set that was its predecessor, SHA-1. A hash is a mathematical function that condenses data in a process of one-way encryption. SHA-256 creates hash algoritms that are considered irreversible and unique. However, one of the properties of hashing algorithms is determinism, which means that any computer in the world would be able to compute a particular hash and get the same answer.

6 0
2 years ago
Is it safe to turn on a computer without ram?
swat32
Well, it is safe to turn a computer on without a RAM, but you can't really do it. RAM is one of the essential components in computers without which you can't really use a computer. You can turn it on, however, nothing will appear on your screen and the system won't boot. So, technically, it is safe, but it won't do anything to your computer as it cannot run without RAM.
4 0
2 years ago
Read 2 more answers
a network administrator for a large oil company has discovered that a host on the company network has been compromised by an att
Slav-nsk [51]

My recommendation as an immediate response to prevent further spoofing of the host is to Revoke the host's certificate.

<h3>What does revoke certificate mean?</h3>

Certificate revocation is the process by which one can  invalidate a TLS/SSL and this is one that is often done before its scheduled expiration date.

Note that A certificate need to be revoked immediately  and as such, based on the case above, My recommendation as an immediate response to prevent further spoofing of the host is to Revoke the host's certificate.

Learn more about network administrator from

brainly.com/question/4264949

#SPJ1

8 0
1 year ago
Create pseudocode to compute the volume of a sphere. Use the formula: V= (4/3)* π r3 where π is equal to 3.1416 approximately, w
MA_775_DIABLO [31]

Answer:

In geometry, the area enclosed by a circle of radius r is πr2. Here the Greek letter π represents a constant, approximately equal to 3.14159, which is equal to the ratio of the circumference of any circle to its diameter.

Explanation:

3 0
2 years ago
Read 2 more answers
Other questions:
  • What is a nonlinear presentation
    9·2 answers
  • In this part, you have to implement a linked list that maintains a list of integers in sorted order. Thus, if the list contains
    13·1 answer
  • What does the internet engineering task force (IEFT) do?
    5·1 answer
  • What do u say to your bf if he says sayy lesssss
    14·2 answers
  • What is conference proceeding​
    10·2 answers
  • URGENT!!! Which file format is used mainly in the Microsoft Windows operating system?
    15·2 answers
  • நெறி என்னும் சொல்லின் பொருள்___ *​
    14·1 answer
  • Direction: using the data at the left, answer the questions that follows.​
    11·1 answer
  • An epic games service is unavailable at the moment
    8·1 answer
  • When was the first analog device, the phonautograph, launched?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!