Reference no: EM13167029
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 procedures 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
Write a c++ program to sort a list of number using vectors
: Write a C++ program to sort a list of number using vectors. Output the values when the elements are inserted into its correct position. Assume the first element in the list is sorted.
|
Write a script that uses two variables
: Write a script that uses two variables to store (1) the count of all of the products in the Products table and (2) the average list price for those products. If the product count is greater than or equal to
|
Design an o(v+e) time algorithm that computes
: Design an O(V+E) time algorithm that computes the smallest number of batches required to complete all tasks. A task can be assigned to a batch i if and only if all tasks that are its prerequisites have already been assigned to batches 1 to (i-1).
|
Write a program that fills in an array
: Write a program that fills in an array, a, of 25 integers where each element contains the sum of all the previous elements plus 1, e.g., a[0] is 1 and a[3] is equal to a[0] + a[1] + a[2] + 1.
|
Create a procedure named validatepin that receives a pointer
: 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.
|
What are two php development tools
: what are two PHP Development tools What is their cost? What platform do they run on? What is their purported 'claim-to-fame'?
|
Design a simple algorithm by giving pseudocode
: Design a simple algorithm by giving pseudocode, for constructing a binary search tree T on n elements in O(nlogn) time with the property that any Find operation on T takes O(logn) time.
|
Writing a simple gui application using a class called myguic
: writing a simple GUI application using a class called MyGuiClass. Your GUI will have a JButton which your program will need to respond to when it is clicked. Describe what you would need to do to setup event handling using a nested inner class. Use J..
|
Consider a cstr with a feed stream
: Consider a CSTR with a feed stream containing only A at a concentration of cA and the reactions A?B?C taking place in the CSTR. Both reactions are first order in the reactant
|