Question: Only use the textbook version of Assembly language program and no credit will be given to any errored programs. Banks use a Personal Identification Number
Only use the textbook version of Assembly language program and no credit will be given to any errored programs. Banks use a Personal Identification Number PIN to uniquely identify each customer. Let us assume that our bank has a specified range of acceptable values for each digit in its customersdigit PINs. The table shown below contains the acceptable ranges, where digits are numbered from left to right in the PIN. Then we can see that the PIN is valid. But the PIN is invalid because the first digit is out of range. Similarly, is invalid because of its last digit.invalid because the first digit is out of range. Similarly, is invalid because of its last digit.
Digit NumberRange
to
to
to
to
to
Your task is to create a procedure named ValidatePIN that receives a pointer to an array of byte containing a digit PIN. Declare two arrays to hold the minimum and maximum range values,and use these arrays to validate each digit of the PIN that was passed to the procedure. If any digit is found to be outside its valid range, immediately return the digits position between and in the EAX register. If the entire PIN is valid, return in EAX. Preserve all other register values between calls to the procedure. Write a test program that calls ValidatePIN at least four times, using both valid and invalid byte arrays. By running the program in a debugger, verify that the return value in EAX after each procedure call is valid. Or if you prefer to use the books library, you can display "Valid" or "Invalid" on the console after each procedure call.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
