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
Consider the following four 2-dimensional data points: (2, 2), (4, 4), (1, 5) and (5, 1). We can make use of the KL-Transform to
trasher [3.6K]

Answer:

pootis

Explanation:

4 0
3 years ago
You're a ticket agent for a commercial airline and responsible for checking the identification for each passenger before issuing
algol13

Answer:

Follows are the code to this question:

import java.util.*;//import package for user input  

public class Main //defining class  

{

  public static void main(String[] as)//main method

  {

      boolean x,y,z;//defining boolean variable

      Scanner ox= new Scanner(System.in);//create Scanner class object for user input

      System.out.println("input value: "); //print message  

      x=ox.nextBoolean();//input value

      y=ox.nextBoolean();//input value

      z=ox.nextBoolean();//input value

      System.out.println("Output: ");//print message

      System.out.println(x || (y &&z));//use print method to check value and print its value  

  }

}

Output:

1)

input value:  

true

false

false

Output:  

true

2)

input value:  

false

true

true

Output:  

true

3)

input value:  

false

false

false

Output:  

false

Explanation:

In the given code, inside the class three boolean variable "x,y, and z" is declared, that uses the scanner class for input the value from the user end, and in the next print, the method is declared, that uses " OR and AND" gate for calculating the input value and print its value.

In the AND gate, when both conditions are true. it will print the value true, and in the OR gate, when one of the conditions is true, it will print the value true.  

3 0
3 years ago
A coworker is taking a computer overseas and asks you what concerns he should have. What do you tell him
DerKrebs [107]

Answer:

The components within the computer can get damage during travel, so he could improve the box protection with foam thingies

Explanation:

3 0
2 years ago
Create a Trip class. Include as data members destination, distance traveled, total cost of gasoline, and number of gallons consu
Luba_88 [7]

The answer & explanation for this question is given in the attachment below.

Download docx
4 0
3 years ago
Which decimal number is equivalent to the hexadecimal number F1?
Papessa [141]

Answer:

C

Explanation:

8 0
2 years ago
Other questions:
  • True/False: If a function is legally prototyped to return an integer value, it can return a structure member that is an integer
    11·1 answer
  • The expression 10,785(1.0275)x represents the amount of money in an investment account with interest that compounds annually for
    14·2 answers
  • A _____ cloud allows an organization to take advantage of the scalability and cost-effectiveness that a public cloud computing e
    5·1 answer
  • Give five functions of Windows​
    15·1 answer
  • The marketplace for computer hardware:________ 1. has become increasingly concentrated in top firms 2. has expanded to include a
    5·2 answers
  • A process at Host C receiving two incoming UDP segments from two different hosts will know that they originated from two differe
    14·2 answers
  • Which rotation speed is not a typical spindle rotation speed for magnetic hard drives?3100; 5400; 7200; 10000
    8·1 answer
  • Write a function that accepts an argument for a persons name. The method should loop through the number of characters in the nam
    7·1 answer
  • Send me the answers<br>​
    15·1 answer
  • Can development and conservation of environment go hand-in-hand? Explain your point of view
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!