Question: For Assembly Language x86: I have the following code: which currently outputs : I would like to modify this so instead of printing out the

For Assembly Language x86:

I have the following code:

For Assembly Language x86: I have the following code: which currently outputs

which currently outputs :

: I would like to modify this so instead of printing out

I would like to modify this so instead of printing out the first number of the array at the bottom, It will allow someone to pick which number they would like to output.

The output would look like:

Enter a number: 9

enter a number: 8

enter a number: 7

enter a number: 6

Pick which array number between 0-3 would you like to output:

2

8 ;// since they picked 2, it outputs the 2nd number that they entered.

.data ;// write your data in this section 13 14 15 16 17 18 19 20 21 myArray WORD 4 DUP(?) prompt BYTE "Enter a number" ,0ah, dh, 0 prompt2 BYTE" pick a number within the array between 0-3 to output that number", 0ah, Odh, 0 .code // write your program here main proc mov eax, 0 mov edx, OFFSET prompt call Writestring call ReadInt mov myArray[o SIZEOF WORD], ax 23 24 25 26 27 28 29 30 31 32 call Writestring call ReadInt mov myArray[1*SIZEOF WORD], ax call Writestring call ReadInt mov myArray[2 * SIZEOF WORD1, ax 34 35 36 37 38 39 40 41 42 43 call Writestring call ReadInt mov myArray[3 * SIZEOF WORD], ax mov ax, myArray[0*SIZEOF WORD] call WriteDec call Crlf invoke ExitProcess,0 45 main endp

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!