Create a procedure named FindThrees that returns 1 if an array has three consecutive values of
Without the spending limits associated with carrying a certain amount of cash, research shows that most people are willing to spend more money using their credit cards than they would spend if they limited their purchases to cash. Maybe it is the possible "loss" felt when the cash physically leaves your wallet and is transferred to a retailer. Maybe it is the convenience of the credit card–fewer pesky trips to the ATM at the bank. Or maybe, as Scott Bilker, founder of debtsmart.com notes:
March 16, 2019
Final Assignment History 108
March 16, 2019

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

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

 

Looking for a Similar Assignment? Order now and Get 20% Discount!
Use Code; GET20

WhatsApp Chat with us on Whatsapp