Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Create a procedure named ValidatePIN that receives a pointer to an array of bytes containing a 5-digit PIN from your main proc. You are required to use the four byte arrays samplePin_1, samplePin_2,samplePin_3 and samplePin_4 declared below.

Use the two arrays (minVals and maxVals) declared below to hold the minimum and maximum range values, and use these arrays to validate each digit of the PIN that was passed to the proc ValidatePIN. If any digit is found to be outside its valid range,immediatey return the digit's position (between 1 and 5) in the EAX register to the main proc. The main proc should then display a message like "digit 3 is invalid". If the entire PIN is valid, return 0 in EAX and display "PIN is valid".

Preserve all other register values between calls to the ValidatePIN procedure. Your main proc should call Validate_PIN 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 and use one of Irvine's library procesures to display "Valid" or "Invalid" on the console after each procedure call. Use this table to validate the ranges:

Digit Number Range
1 5 to 9
2 2 to 5
3 4 to 8
4 1 to 4
5 3 to 6

minVals byte 5,2,4,1,3 ; globally visible
maxVals byte 9,5,8,4,6 ; globally visible
samplePin_1 byte 6,3,4,4,3
samplePin_2 byte 5,2,3,2,4 
samplePin_3 byte 5,2,4,5,3
samplePin_4 byte 1,3,4,4,3 

Required minimum 1 page

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M981685

Have any Question?


Related Questions in Computer Engineering

A streaming company needs to measure the average time

A streaming company needs to measure the AVERAGE time spread for users who watch video on their platform in a session. Each user has one time spread, which is the difference between her longest session streaming video an ...

A student is applying to harvard and dartmouth if the

A student is applying to Harvard and Dartmouth. If the student is accepted at Dartmouth, the probability of being accepted at Harvard is 40%. If the student is not accepted at Dartmouth there is an 80% of non-acceptance ...

What is the net present value of a project with a discount

What is the Net Present Value of a project with a discount rate of 12%p.a. whose Net Cash Flows are forecast to be: Year 0: $15,000 outflow Year 1: $2,000 inflow Year 2: $3,000 inflow Year 3: $5000 inflow Year 4 $10,000 ...

Explain that this threat represents a well-known and broad

Explain that this threat represents a well-known and broad category of electronic and human activities that breach the confidentiality of information.

There are two firms that produce large commercial airplanes

There are two firms that produce large commercial airplanes, namely, Boeing and Airbus. Boeing and Airbus have different flight control systems, with many pilots preferring one system over the other. The Airbus A380 has ...

Suppose our task is to distinguish between humans and

Suppose our task is to distinguish between humans and non-human objects in an image, which classifier would you choose and why? Decision trees, perceptrons or neural nets.

The freezing point depression constant forwater is -186 cm

The freezing point depression constant forwater is -1.86 C/m. If 5.00 g Na2SO4 is dissolved in 45.0 g H2O, the freezing point is changed by -3.82 C. Calculate the van't Hofffactor for Na2SO4.

Question suppose that an attack would do 200000 in damage

Question : Suppose that an attack would do $200,000 in damage and has a 25% annual probability of success. Spending $15,000 per year on Countermeasure A would reduce the damage of a successful attack by 50%. a) Do a risk ...

Question group work this weekbull introduce yourself to

Question: Group work this week: • Introduce yourself to your group • Start planning out the project with your group • The group should compile the following information into a draft document 1. What specific and detailed ...

Describe the definition of ransomware and what is wannacry

Describe the definition of ransomware. And what is wannacry threat?

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As