Create a procedure named validatepin that receives a pointer

Assignment Help Assembly Language
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

Reference no: EM13167029

Questions Cloud

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

Reviews

Write a Review

Assembly Language Questions & Answers

  Program that requests n as input

Write a program that requests N as input and computes the left-hand and the right-hand sides of the equation, verifies that they are equal, and displays the result.

  Application that finds all 4 digit numbers

Create an application that finds all 4 digit numbers (those would be the numbers in the range 1000-9999) whose value is equal to the sum of each digit raised to the fourth power. MEANINGFUL output should be sent to the screen.

  Write a sequence of two instructions

Write a sequence of two instructions that copies the inter in 4-7 from the AL registers into bits 0-3 of the Bl register. The upper 4 bits of AL will be cleared as will the upper 4 bits of BL. (Microsoft Assembly Language)

  Decimal floating point number

What decimal floating point number does this IEEE 754 single precision number represent: 0x47C0_E6B7?

  Program that ask the user to input a number between 0-10

Write a program that ask the user to input a number between 0-10 (n). Then your program finds the factorial of the number

  Program a maze-type game using assembly language

This project requires you to program a maze-type game using Assembly Language. It is not acceptable to use any other programming language for this project. T

  Write an assembly program

Prepare an Assembly program that reads in a number of cents.

  Draw a flow chart for this

Draw a Flow Chart for this 8051 assembly language program below. This program calculate y=x^2+ 2x+9. Register R0 has the x, and at the end of the program R2 should have y. (Test program for x=9).

  Write an arm subroutine which will extract a substring

Write an ARM subroutine which will extract a substring from a string. You will need to use the library routine malloc to allocate memory for the new string. Use the pointers(a1,a2,a3) as stated below for writing ARM PROGRAM

  Write a program in assembly code for the simulator

Write a program in assembly code for the simulator that will count from 107 to 14 backwards by 3 and display the counter in the output on each iteration of the loop. (Must be in R1, R2, load and add form)

  Design a simple digital clock

Design a simple digital clock

  Assembly language point-of-view

From an Assembly Language point-of-view, any registers that are touched by a function need to first be preserved and then later restored to their original value when that function ends, if that functions wishes to leave no side-effects after its exec..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd