Question: HIGH RATING FOR CORRECT ANSWER, ASSEMBLY LANGUAGE CODE Write a subroutine called PIN_CHECK to check if a PIN number entered by a user is among

HIGH RATING FOR CORRECT ANSWER, ASSEMBLY LANGUAGE CODE

HIGH RATING FOR CORRECT ANSWER, ASSEMBLY LANGUAGE CODE Write a subroutine called

Write a subroutine called PIN_CHECK to check if a PIN number entered by a user is among a list of valid PINs. PIN stands for Personal Identification Number. PINs can take values from 00000 to 65, 535. The valid PINs are stored in an array of words and the first word has the total number of PINs, each PIN is stored in a word, and Y points at the beginning of the array, as indicated in the figure. The five digits of the PIN entered by the user are stored in 5 consecutive bytes, where register X points at the beginning address. First, the subroutine should convert the PIN's 5 digits to a decimal number as follows digit #5 X 10000 + digit #4 X 1000 + digit #3 X 100+ digit #2 X 10 + digit#1. For example, the PIN's digits 5, 2, 3, 6, and 1 are converted to 5 X 10000 + 2 X 1000 + 3 X 100 + 6 X 10 + 1 = 52361. The subroutine should return 00 in register B if the PIN is not found otherwise it returns FF in B. B should also have EE if the PIN's decimal value is greater than 65535

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!