subject

ASSEMBLY LANGUAGE Using a loop and indexed addressing, write code that rotates the members of a 32-bit integer array forward one position. The value at the end of the array must wrap around to the ?rst position. For example, the array [10,20,30,40] would be transformed into [40,10,20,30].
This is what I got but I need to display the array before and after the rotation something like Array before Rotation: x x x x , Array after rotation: x x x x and also need to input the 4 numbers with the keyboard
.386
.model flat, stdcall
.stack 4096
ExitProcess PROTO, dwExitCode:DWORD
.data
array DWORD 10,20,30,40
arrayType DWORD TYPE array
newArray DWORD LENGTHOF array DUP(?)
lastElement DWORD ?
.code
main PROC
;Get first element address in ESI
MOV ESI, OFFSET array
;Get address of next element in EDI
MOV EDI, OFFSET newArray
ADD EDI, TYPE newArray
;set loop count into ecx
mov ECX, LENGTHOF array
L2:
MOV EAX, [ESI]
MOV [EDI], EAX
ADD ESI, TYPE array
ADD EDI, TYPE array
LOOP L2
;set last element from array in newArray first position
MOV EDI, OFFSET newArray
MOV EAX, [ESI]
MOV [EDI], EAX
INVOKE ExitProcess,0
main ENDP
END main

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:30
Aconstruction company is creating a powerpoint presentation describing how they calculate costs during each construction step. they plan to email this presentation to clients. the individual clients will be watching the presentation slide show on their own personal computers. what is the most important formatting step the company should take to make the text readable and pleasing to the eye?
Answers: 2
question
Computers and Technology, 23.06.2019 00:40
Consider the following statements: struct nametype{string first; string last; }; struct coursetype{string name; int callnum; int credits; char grade; }; struct studenttype{nametype name; double gpa; coursetype course; }; studenttype student; studenttype classlist[100]; coursetype course; nametype name; mark the following statements as valid or invalid. if a statement is invalid, explain why.a.) student.course.callnum = "csc230"; b.) cin > > student.name; c.) classlist[0] = name; d.) classlist[1].gpa = 3.45; e.) name = classlist[15].name; f.) student.name = name; g.) cout < < classlist[10] < < endl; h.) for (int j = 0; j < 100; j++)classlist[j].name = name; i.) classlist.course.credits = 3; j.) course = studenttype.course;
Answers: 1
question
Computers and Technology, 23.06.2019 21:00
Uget brainliest if accurate mary has been given the responsibility of hiring a person for the position of a software testing officer. which management function would mary achieve this responsibility?
Answers: 1
question
Computers and Technology, 24.06.2019 20:30
Does the query hawaiian photographers fully meets results?
Answers: 1
You know the right answer?
ASSEMBLY LANGUAGE Using a loop and indexed addressing, write code that rotates the members of a 32-...
Questions
question
Mathematics, 11.09.2020 02:01
question
Mathematics, 11.09.2020 02:01
question
Mathematics, 11.09.2020 02:01
question
Mathematics, 11.09.2020 02:01
question
Mathematics, 11.09.2020 02:01
question
Biology, 11.09.2020 02:01
question
Mathematics, 11.09.2020 02:01
question
Mathematics, 11.09.2020 02:01
question
Social Studies, 11.09.2020 02:01
question
English, 11.09.2020 02:01
question
Mathematics, 11.09.2020 02:01
question
Mathematics, 11.09.2020 02:01
question
English, 11.09.2020 02:01
question
Mathematics, 11.09.2020 02:01
question
Mathematics, 11.09.2020 02:01
question
English, 11.09.2020 02:01
question
Mathematics, 11.09.2020 02:01
question
Mathematics, 11.09.2020 02:01
question
Mathematics, 11.09.2020 02:01
question
Mathematics, 11.09.2020 02:01
Questions on the website: 13722359