Create a procedure named FindThrees that returns 1 if an array has three consecutive values of

profileThehonest
 (Not rated)
 (Not rated)
Chat

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.

INCLUDE Irvine32.inc


FindThrees PROTO, pArr: PTR BYTE, length: BYTE

.data
strCons BYTE “The array contains three consecutive 3.”,0
strNonCon BYTE “The array does not contain three consecutive 3.”,0
arrOne BYTE 1, 2, 3, 2
arrTwo BYTE 3, 3, 5, 7, 3
arrThree BYTE 4, 3, 3, 3, 1, 8

    • 5 years ago
    A+ Work
    NOT RATED

    Purchase the answer to view it

    blurred-text
    • attachment
      bq__26.doc