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
Part of the central processing unit
AveGali [126]

Answer:

Explanation:

The arithmetic logic unit (ALU) performs mathematical, logical, and decision operations.  It can be divided into the arithmetic unit (responsible for addition, subtraction, multiplication and division).  And logic unit (responsible for comparing, selecting, matching and merging different data or information).  The power and efficiency of the CPU depends on the design of the ALU.  

Next up is the control unit (CU) which directs all the processor’s operations.  It’s where the CPU reads and interprets requests from memory and transforms them into a series of signals (binary).  Then it sends the operation to various parts of the laptop as instructed.  The CU calls the ALU to perform the necessary calculations.  It also coordinates all input/output devices to transfer or receive instructions.

The main job of the memory unit is to store data or instructions and intermediate results.  It’s divided into primary memory and secondary memory to supply data to other units of the CPU.  It allows the CPU to perform functions requested by programs like the operating system without having to ask RAM.

Another element of the CPU not depicted in the diagram is transistors.  To carry out calculations, binary information (ones and zeros) is stored in these microscopic switches.  They control the flow of electricity depending on whether the switch is ON or OFF.  Signals turn off and on different combinations of transistors to perform calculations.  A very thin silicon chip can contain several hundred million transistors.

8 0
2 years ago
Does a newer game work on older computer
babunello [35]
I don't think so because the old computers may have not been to date as what we have now but check it out and see.
5 0
3 years ago
The scope of a variable declared outside of any function is:
Marta_Voda [28]

Answer:

a) Global

Explanation:

The scope of a variable declared outside of any function is Global.

Let us consider an example:

int g;

int  add(int a,int b){

   return a+b;

}

int  subtract(int a,int b){

   return a-b;

}

Here the variable g is defined outside any function and is accessible anywhere within the program. This is a global variable.

Variables defined within each function - a,b on the other hand have a local scope are are visible only within their respective function bodies.

5 0
3 years ago
Can you redact this image
spin [16.1K]

Answer:what???

Explanation:so

What

6 0
2 years ago
An algorithm requires numbers.<br> O True<br> O<br> False
Naya [18.7K]
True hope this helps
6 0
2 years ago
Read 2 more answers
Other questions:
  • Write a Tip Calculator in code in VMware Fusion
    13·1 answer
  • Assume that processor refers to an object that provides a void method named process that takes no arguments. As it happens, the
    5·1 answer
  • Which is a feature of a strong thesis statement? A) It presents only the facts. B) It is open-ended. C) It answers the central q
    15·1 answer
  • The purpose of a lockout tagout checklist is to​
    9·2 answers
  • Write a Java program that generates a new string by concatenating the reversed substrings of even indexes and odd indexes separa
    5·1 answer
  • In a five-choice multiple-choice test, which letter is most often the correct
    10·2 answers
  • Most significant effect the rotary press had on printing
    9·1 answer
  • What do other people think of e.t ( be specifc by putting a line in the story)<br><br> E.T MOVIE
    11·1 answer
  • Suppose that you set the application-level environment setting for the current workspace to store all your data in the same geod
    7·1 answer
  • A system that receives drawing information from electronic cad files, prepares the printing materials, and controls the size and
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!