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, 22.06.2019 22:00
During physical science class ben and jerry connected three identical lightbulbs in parallel to a battery where happens when ben removes one of the lightbulbs from it’s socket
Answers: 2
question
Computers and Technology, 23.06.2019 22:20
What is a programming method that provides for interactive modules to a website?
Answers: 1
question
Computers and Technology, 24.06.2019 03:30
Which explains extrinsic motivation? a)motivation in which there is a reward b)motivation that is personally satisfying c)motivation that is personally meaningful d)motivation in which the subject is interesting
Answers: 1
question
Computers and Technology, 24.06.2019 13:20
3. ranga ramasesh is the operations manager for a firm that is trying to decide which one of four countries it should research for possible outsourcing providers. the first step is to select a country based on cultural risk factors, which are critical to eventual business success with the provider. ranga has reviewed outsourcing provider directories and found that the four countries in the table that follows have an ample number of providers from which they can choose. to aid in the country selection step, he has enlisted the aid of a cultural expert, john wang, who has provided ratings of the various criteria in the table. the resulting ratings are on a 1 to 10 scale, where 1 is a low risk and 10 is a high risk. john has also determined six criteria weightins: trust, with a weight of 0.3; quality, with 0.2; religious, with 0.1; individualism, with 0.2; time, with 0.1; and uncertainity, with 0.1. using the factor-rating method, which country should ranga select? why? (2 points)
Answers: 3
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
Spanish, 14.12.2020 20:10
Questions on the website: 13722363