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
What are the two types of lighting?
RideAnS [48]

The answer to this question is E

7 0
4 years ago
Read 2 more answers
What kind of keybord is tis ned help pleese I don't no wat itis​
Murrr4er [49]

Answer:

judging by the logo at the top it's a hyperx keyboard and looks to be the alloy core rgb... hope this helps!

8 0
3 years ago
Read 2 more answers
What is the correct process for inserting a blank worksheet in Google sheets
Yakvenalex [24]
Depending on what you would want to achieve, you can create a new spreadsheet in your Google sheets or import and already existing blank or old spreadsheet to Google sheets. To create a new spreadsheet, you will click on the new spreadsheet option from the Sheets Homepage. Assuming that you already have a G suite account, from your Google drive, you will click New - Google Sheets - Blank spreadsheet.

To import, go to Drive, click New and then file upload. Choose your already existing spreadsheet from your PC and add it to the drive. While in drive, right click the spreadsheet you would like to convert and the select open with Google sheets  




6 0
3 years ago
How may bit strings are there of length 8
deff fn [24]

Answer:

there are 256 bits. there 256 values u can store in a byte

5 0
4 years ago
Read 2 more answers
How many pieces can be connected on to a to an SPS​
alexira [117]

Answer:

i dont know

Explanation:

4 0
3 years ago
Other questions:
  • The _____ approach treats process and data independently and is a sequential approach that requires completing the analysis befo
    14·1 answer
  • Computer program allowing the computer to communicate<br> with a hardware device
    13·1 answer
  • Communication mode which supports data in both directions at the same time is called
    6·1 answer
  • The motion of any object can be broken down into it's component (parts of) vectors. true or false
    5·1 answer
  • #Write a function called "replace_all" that accepts three #arguments: # # - target_string, a string in which to search. # - find
    11·1 answer
  • Choose all the answers that apply.
    14·1 answer
  • Traditionally, remote administrative access on routers was configured using Telnet on TCP port 23. However, Telnet was developed
    8·1 answer
  • How much do high-end earners make as power plant operators? Type answer as numerical number.
    14·1 answer
  • If you got band from a local library, what would be the reason for it besides shouting and talking? You're answer has to fit you
    15·2 answers
  • How to install specific version of create-react-app so.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!