subject

Create a procedure named FindThrees that returns 1 if an array has three consecutive values of 3 somewhere in the array. Otherwise, return 0. The
procedure's input parameter list contains a pointer to the array and the
array's size. Use the PROC directive with a parameter list when declaring
the procedure. Preserve all registers (except EAX) that are modified by
the procedure. Write a test program that calls FindThrees several times
with different arrays.
!
.386
.model flat, stdcall
.stack 4096
ExitProcess proto, dwExitCode:dword
FindThrees proto aPtr:PTR SDWORD, arraySize:DWORD
.data
strSuccess BYTE "Success.", 0
strFailure BYTE "Failure.", 0
Array1 sdword 4, 6, 3, 3, 2, 5 ; false
Array2 sdword 3,3,3,9,5 ; true
Array3 sdword 1,2,3,3,4,3,3,3,9 ; true
Array4 sdword 1,2,4,-4,-5,9 ; false
.code
main proc
invoke FindThrees, ADDR Array1, LENGTHOF Array1 ;invoke FindThrees procedure for Array 1
;invoke FindThrees procedure for Array 2
;invoke FindThrees procedure for Array 3
;invoke FindThrees procedure for Array 4
invoke ExitProcess,0
main endp
FindThrees proc,
aPtr:PTR SDWORD, arraySize:DWORD

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 04:31
Which of the following is not a way in which trees benefit the environment? a. they remove a significant amount of carbon dioxide from the atmosphere. b. they remove a significant amount of oxygen from the atmosphere. c. their roots hold soil in place, reducing rates of erosion. d. they remove ozone and particulates from the atmosphere. select the best answer from the choices provided a b c d
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
Write a function called checkfactor that takes two arrays of positive numbers, firstnumberrow and secondnumberrow. checkfactor checks if the first entry in firstnumberrow is divisible by the first entry in secondnumberrow, and performs the same operation on the next array elements until all entries have been checked. all the numbers are positive and the number of entries in the arrays are the same. the function should return the identified divisible numbers in two row arrays named firstdivisible and seconddivisible.restrictions: branches or loops should not be used. the code must use the internal mod and logical functions.hint: the mod function should be used to determine if two numbers are divisible. ex: for num1 and num2 if mod(num1,num2) is 0, then the two numbers are divisible.this is matlab
Answers: 2
question
Computers and Technology, 23.06.2019 22:00
Technician a says engine assemblies can be mounted longitudinally in a chassis. technician b says engine assemblies can be mounted transversely in a chassis. who is correct?
Answers: 2
question
Computers and Technology, 24.06.2019 18:00
Your computer running windows 10 is doing some very strange things with the operating system. you are fairly certain it is not a hardware issue. you need to try to get further insight into what is going on within the operating system. which tool would be best-suited for this?
Answers: 1
You know the right answer?
Create a procedure named FindThrees that returns 1 if an array has three consecutive values of 3 so...
Questions
question
Social Studies, 27.03.2021 01:00
question
Mathematics, 27.03.2021 01:00
question
Mathematics, 27.03.2021 01:00
question
Mathematics, 27.03.2021 01:00
question
Mathematics, 27.03.2021 01:00
question
Mathematics, 27.03.2021 01:00