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
laiz [17]
3 years ago
7

Compose a program to examine the string "Hello, world!\n", and calculate the total decimal numeric value of all the characters i

n the string (including punctuation marks), less the numeric value of the vowels.
The program should load each letter, add that numerie value to the running total to produce a total sum, and then add the value to a "vowels running total as well. The program will require a loop. You do not need a counter, since the phrase is null terminated. Remember, punctuation (even spaces!) have a numeric value as well.
Computers and Technology
1 answer:
Ainat [17]3 years ago
6 0

Answer:

.data

  str:   .asciiz   "Hello, world!\n"

  output:   .asciiz "\nTotal character numeric sum = "

.text

.globl main

main:

  la $t0,str       # Load the address of the string

  li $t2,0       # Initialize the total value to zero

loop:   lb $t1,($t0)       # Load one byte at a time from the string

  beqz $t1,end       # If byte is a null character end the operation

  add $t2,$t2,$t1       # Else add the numeric value of the byte to the running total

  addi $t0,$t0,1       # Increment the string pointer by 1

  b loop           # Repeat the loop

end:

  # Displaying the output

  li $v0,4       # Code to print the string

  la $a0,output       # Load the address of the string

  syscall           # Call to print the output string

  li $v0,1       # Code to print the integer

  move $a0,$t2       # Put the value to be printed in $a0

  syscall           # Call to print the integer

  # Exiting the program

  li $v0,10       # Code to exit program

  syscall           # Call to exit the program

Explanation:

You might be interested in
A professor is working with five teams in his marketing research class. He decides to experiment with path-goal theory in helpin
ludmilkaskok [199]

Answer:

A) an instrumental style

Explanation:

Based on the information provided within the question it can be said that with Group A the professor seems to be using an instrumental style. This is a specific style of communication which is goal oriented and sender focused. This seems to be the style being used since the professor gets them to seek out and produce an even better project than the one they did last time in order to impress the professor (sender).

6 0
4 years ago
What program command saves a copy of a file under a different name
svlad2 [7]

Answer:

It differs from the regular Save command, which stores the data back to the file and folder it originally came from. "Save As" lets the user make a copy of the file in a different folder or make a copy with a different name.

Explanation: plz mark brainlist

7 0
2 years ago
What summarizes a data source into a grid of rows and columns?
Ludmilka [50]
#1) What summarizes a data source into a grid of rows and columns?
Answer: A Database. A database is an organized collection of data. It is the collection of schemas, tables, queries, reports, views, and other objects. The data are typically organized to model aspects of reality in a way that supports processes requiring information.
4 0
3 years ago
Read 2 more answers
The home page box will only appear with what people you may know
mariarad [96]
Whats the qustion...
3 0
3 years ago
Publishers that participate in a display ad network _____ a) get paid each time an advertiser is charged by the ad network for d
Natasha_Volkova [10]

Answer:

The correct option to the following question is an option (a).

Explanation:

Because when the advertisement is published on the publisher's site then any user who visited on his site and if they click on that advertisement then the advertiser gets the credit of that advertisement charge which is paid by the publisher.

That's why this option is correct.

The other options are incorrect because they get charge whenever any visitor clicks on the advertisement.

5 0
3 years ago
Other questions:
  • Which of the following is CORRECT about database managementsystem's languages?
    6·1 answer
  • Enables you to navigate through pieces of information by using links which connect them.
    10·1 answer
  • What layer uses the UDP protocol
    6·1 answer
  • g 18.6 [Contest 6 - 07/10] Reverse an array Reversing an array is a common task. One approach copies to a second array in revers
    8·1 answer
  • Shipments of compact digital cameras dropped by 42% due to the industry being unable to adjust to changes in the ________. a. ec
    11·1 answer
  • Write a recursive function stringReverse that takes a string and a starting subscript as arguments, prints the string backward a
    5·1 answer
  • When an instruction is sent to the CPU in a binary pattern, how does the CPU know what instruction the pattern means
    7·1 answer
  • PLEASE HELLPPPPP EVERYONE IS IGNORING THISSSSSSSSSS
    11·1 answer
  • What is the most common representation of a distribution?
    14·1 answer
  • Explain why the scenario below fails to meet the definition of a stakeholder.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!