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
barxatty [35]
3 years ago
11

I'm using assembly language. This is my assignment. I kinda confused about how to write code for this assignment. Can anyone exp

lain to me how to write? ASAP!!
Write a complete program that 1. Prompt the user to enter 10 numbers. 2. save those numbers in a 32-bit integer array. 3. Print the array with the same order it was entered. 3. Calculate the sum of the numbers and display it. 4. Calculate the mean of the array and display it. 5. Rotate the members in the array forward one position for 9 times. so the last rotation will display the array in reversed order. 6. Print the array after each rotation. check the sample run. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Don't use any shift or rotate instructions which we have not covered yet. You need to use loops and indexed addressing. All you work should be on the original array. Don't make a copy of the array at any time. Add comments to make your program easy to read. check the reburic before you submit. Sample Run:

Please enter a number: 2
Please enter a number: 3
Please enter a number: 4
Please enter a number: 5
Please enter a number: 6
Please enter a number: 7
Please enter a number: 8
Please enter a number: 9
Please enter a number: 0
Please enter a number: 10
The sum is: 54
The mean is: 5 4/10
The original array: 2 3 4 5 6 7 8 9 0 10
After a rotation: 10 2 3 4 5 6 7 8 9 0
After a rotation: 10 0 2 3 4 5 6 7 8 9
After a rotation: 10 0 9 2 3 4 5 6 7 8
After a rotation: 10 0 9 8 2 3 4 5 6 7
After a rotation: 10 0 9 8 7 2 3 4 5 6
After a rotation: 10 0 9 8 7 6 2 3 4 5
After a rotation: 10 0 9 8 7 6 5 2 3 4
After a rotation: 10 0 9 8 7 6 5 4 2 3
After a rotation: 10 0 9 8 7 6 5 4 3 2
Press any key to continue . . .
Computers and Technology
1 answer:
Brut [27]3 years ago
6 0

Answer:

oid changeCase (char char_array[], int array_size ) {

__asm{

   mov eax, char_array;    

   mov edi, 0;

readArray:

   cmp edi, array_size;

   jge exit;

   mov ebx, edi;          

   shl ebx, 2;

   mov cl, [eax + ebx];    

check:

   //working on it

   cmp cl, 0x41;      

   jl next_indx;

   cmp cl, 0x7A;      

   jg next_indx;

   cmp cl, 'a';

   jl convert_down;

   jge convert_up;

convert_down:

   or cl, 0x20;        //make it lowercase

   jmp write;

convert_up:

   and cl, 0x20;      

   jmp write;

write:

   mov byte ptr [eax + ebx], cl    

next_indx:

   inc edi;

exit:

   cmp edi, array_size;

   jl readArray;

mov char_array, eax;

}

}

Explanation:

  • Move char_array to eax as it is base image .
  • Use ebx as offset .
  • Use ecx as the storage register .
  • check if cl is <= than ASCII value 65 (A) .
You might be interested in
Which of the following is the fastest way to open an Access database? a. Right-click the database icon. b. Start Access from the
STALIN [3.7K]

Answer:

C. Double-click the database icon.

5 0
2 years ago
Read 2 more answers
What is a web client ​
Anna [14]

Explanation: It's something like siri. It's a machine or technology inside a phone or computer that gives you information to a question that you asked.

5 0
3 years ago
Read 2 more answers
A software program that allows you to create professional looking multimedia presentations. Question 1 options: Excel 365 Word 3
maks197457 [2]

Powerpoint is a program that allows  us to create professional looking multimedia presentations.

<h3>What is Multimedia presentations?</h3>

A multimedia presentation is a way of communication where we use audio,vedio,arts,drawings and other various ways to present communcations.

<h3>Why Ms-PowerPoint ?</h3>

Ms-PowerPoint consists of some simple and understandable features to make notes through slides create vedio and vedio editing, Coral Draws Audio editing etc.

We can create banners,record vedios,draw and design with the help of tools provided by powerpoint.

Powerpoint also helps to transform boring presentation to an eye catching presentation.

Learn more about PowerPoint here:brainly.com/question/10117380

4 0
2 years ago
Which of these are correctly formatted Python tuples? CHECK ALL THAT APPY.
grin007 [14]
I think C is correct I looked into some Python and that would seam like the most logical answer
4 0
2 years ago
Read 2 more answers
What will be displayed after code corresponding to the following pseudocode is run? Main Set OldPrice = 100 Set SalePrice = 70 C
Tatiana [17]

Answer:

A jacket that originally costs $ 100 is on sale today for $ 80                                    

Explanation:

Main : From here the execution of the program begins

Set OldPrice = 100  -> This line assigns 100 to the OldPrice variable

Set SalePrice = 70   -> This line assigns 70to the SalePrice variable

Call BigSale(OldPrice, SalePrice)  -> This line calls BigSale method by passing OldPrice and SalePrice to that method

Write "A jacket that originally costs $ ", OldPrice  -> This line prints/displays the line: "A jacket that originally costs $ " with the resultant value in OldPrice variable that is 100

Write "is on sale today for $ ", SalePrice  -> This line prints/displays the line: "is on sale today for $ " with the resultant value in SalePrice variable that is 80

End Program -> the main program ends

Subprogram BigSale(Cost, Sale As Ref)  -> this is a definition of BigSale method which has two parameters i.e. Cost and Sale. Note that the Sale is declared as reference type

Set Sale = Cost * .80  -> This line multiplies the value of Cost with 0.80 and assigns the result to Sale variable

Set Cost = Cost + 20  -> This line adds 20 to the value of Cost  and assigns the result to Cost variable

End Subprogram  -> the method ends

This is the example of call by reference. So when the method BigSale is called in Main by reference by passing argument SalePrice to it, then this call copies the reference of SalePrice argument into formal parameter Sale. Inside BigSale method the reference &Sale is used to access actual argument i.e. SalePrice which is used in BigSale(OldPrice, SalePrice) call. So any changes made to value of Sale will affect the value of SalePrice

So when the method BigSale is called two arguments are passed to it OldPrice argument and SalePrice is passed by reference.

The value of OldPrice is 100 and SalePrice is 70

Now when method BigSale is called, the reference &Sale is used to access actual argument SalePrice = 70

In the body of this method there are two statements:

Sale = Cost * .80;

Cost = Cost + 20;

So when these statement execute:

Sale = 100 * 0.80 = 80

Cost = 100 + 20 = 120

Any changes made to value of Sale will affect the value of SalePrice as it is passed by reference. So when the Write "A jacket that originally costs $ " + OldPrice Write "is on sale today for $ " + SalePrice statement executes, the value of OldPrice remains 100 same as it does not affect this passed argument, but SalePrice was passed by reference so the changes made to &Sale by statement in method BigSale i.e.  Sale = Cost * .80; has changed the value of SalePrice from 70 to 80 because Sale = 100 * 0.80 = 80. So the output produced is:

A jacket that originally costs $ 100 is on sale today for $ 80                              

7 0
3 years ago
Other questions:
  • Kendra needs to configure a visual alert for an appointment that she is creating for next week. What should she configure?
    11·1 answer
  • Because you do not know every possible future use for the data TerramEarth collects, you have decided to build a system that cap
    15·1 answer
  • In the range C15:G15, insert a function to calculate the total daily revenue. In the range H11:H15, insert a function to calcula
    8·1 answer
  • What list did poe appear on for the search engine lycos?
    11·1 answer
  • Which of the following is NOT a good idea to do after you change the root password?
    12·1 answer
  • Plane eyes I don't know
    9·1 answer
  • How do you add a PDF assignment to google docs and be able to edit it?
    13·1 answer
  • What is the purpose of a system call in an operating system?
    10·1 answer
  • What feature allows you to access previous copies of a document on OneDrive?
    15·2 answers
  • A major public university graduates approximately 10,000 students per year, and its development office has decided to build a We
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!