Chip Credit Card Transaction & IMEI Validation


Added on  2019-09-20

6 Pages1854 Words462 Views
Submit assignments using MyLearningSpace following theassignment and coding specifications.YouCANNOTuse the structured control commands (If - Then - Else - Endif; If - Then- Endif) as described in the EASy68K > Assembler Commands > Structured Control.Forallprograms:Input any required values from the keyboard.When prompting the user for input, be user friendly and state the input range in decimal for the user; don't assume the user understands phrases like "unsigned 8-bit number".Output results to the screen.Run the program with multiple sets of data to prove your program works and handles all of the appropriate cases.1.Background: Use Easy68K Text I/O task 5 to read one ASCII character from the keyboard.Write a program to prompt the user for one character from the keyboard. For the character entered, classify the character as a number, a letter, or other if it isnot a number or a letter.oLoop until the user enters an * (asterisk).oOutput must be of the formcharacter is classification, e.g. 5 is a number, V is a letter, $ is other.oFor example,> prompt for one character> user enters5> you output5 is a number> .... loop until * entered2.Background: Use Easy68K Text I/O task 4 - "Read a number from the keyboard into D1.L". Task 4 takes the decimal number you enter and converts it from ASCII into an equivalent numeric value. For example, when you enter the characters '12' on the keyboard, you are actually entering the ASCII string $3132. Easy68K I/O Task 4 will take $3132 hexadecimal and convert it to $0000000C or decimal 12.
Chip Credit Card Transaction & IMEI Validation_1

Write a program to:oprompt the user for the number of items in the data list> valid range will be from 0 up to a maximum of 10 numbers> if the number of items is out of range, indicate the number is out of range and prompt the user for the number of items againoprompt the user for the data which will be unsigned 8-bit numbers entered individually> if the data is out of range, indicate the number is out of range and prompt the user for another number.Note: keep prompting for data until you get the correct number of 'good'numbers.oFind the smallest number and output this number to the screen (in decimal) and the LEDs (in binary).oFor example,oprompt userouser enters3to indicate the number of items,oprompt userouser enters15,oprompt userouser enters500then ask for another number as entry is out of range,ouser enters255,oprompt userouser enters5oput out minimum ->Minimum: 5to screen and00000101to LEDsoBackground: Use Text I/O task 2 "Read string from keyboard and store at (A1), NULL (0) terminated, length returned in D1.W (max 80) " Note that A1 should be correctly initialized to point to the storage location for the data.Write a program to prompt the user for a series of two character words from the keyboard and then display them on the monitor in reverse order. The list of words will be terminated with a carriage return.For example,> prompt the user for a list of two character words; terminate list of words by pressing the <Enter> or <CR> key
Chip Credit Card Transaction & IMEI Validation_2

> assume data entered correctly (no error checking)> user entersto<CR>be<CR>in<CR>as<CR><CR>> you output the words in reverse orderasinbeto> ask if there is another list of data. If the user enters Y ... repeat; if the user enters N, then quit.HINT: I chose 2 character words so that each word would fit in a word sized memory location. This would make the list easy to handle. Declare the list at the end of your data area.oBackground: Many of the EASy68K I/O tasks execute additional code toconvert from the data entered on the keyboard to the expected data type. On a real system, when you enter a character from the keyboard it isnotautomatically echoed to the screen. The software receiving the character determines whether it is appropriate to display the character onthe screen and handles the echo itself. Easy68K uses I/O Task 12 "Keyboard Echo" to turn the keyboard echo on/off; by default, Easy68K turns keyboard echo 'on' to simplify I/O for the beginning programmer.Using I/O task 12 with keyboard echo 'off' (youare now responsible for doing the character echo to the screen) and I/O task 5 to read in single characters, write a program to implement the I/O for a portion of a chip credit card transaction:Input/Output:oprompt the user to "ENTER PIN + OK"> PIN will be four numbers> use the <Enter> key on the keyboard as the OK key> since the keypad is numeric, there is no need to check if data entered isa number
Chip Credit Card Transaction & IMEI Validation_3

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
C Programming Language Assignment

Scope and Variable Issues

BIS 335 Homework 6

Accounting Definitions and Types of Controls

CST8283 Final Exam Winter 2022 Question Answer 2022

Components of Computer System - PDF