Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help on these two questions please. Thanks Draw a diagram showing the contents of the stack and SP each time they change. Refer

image text in transcribed

I need help on these two questions please. Thanks

Draw a diagram showing the contents of the stack and SP each time they change. Refer to the instruction that changes the stack. How many bytes should be reserved for the stack (i.e, what is the maximum stack size)? 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 m 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 Times 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 m B. B should also have EE if the PIN's decimal value is greater than 65535. Draw a diagram showing the contents of the stack and SP each time they change. Refer to the instruction that changes the stack. How many bytes should be reserved for the stack (i.e, what is the maximum stack size)? 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 m 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 Times 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 m 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database 19c DBA By Examples Installation And Administration

Authors: Ravinder Gupta

1st Edition

B09FC7TQJ6, 979-8469226970

Students also viewed these Databases questions