Practical 6 Programming Tutorial 2

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 1

Subject: Microprocessor and Interfacing Experiment No.

06 DATE:

Title: Programming tutorial 2

Rev. No.

1.00

Exercise 1 2 3 Six data bytes are stored at memory locations starting from F100H. Write a program to separate data with odd parity. Store all such data bytes at memory location F200H. Write to count how many increments is required to equalize 67H and 85H. 67H sould increment and 85H should decrement one by one. A set of data bytes is stored in the memory locations starting at FF50H. Check each data byte for bits D7 and D0. If D7 or D0 is 1, reject the data byte, otherwise store the data at memory location starting at FF80H. The end of data string is indicated by the data byte 00H. (Use compare) A set of ten current readings is stored in memory locations starting at F060H. The readings are expected to be positive. Write a program to 5 Check each reading whether it is positive or negative Reject all negative readings Add all positive readings If the sum of positive readings exceeds 8 bits, stop addition and display 01H at output port, otherwise display the sum (entire 2 byte) at output port.(Use JM/RAL) Use register pair DE as a memory pointer and memory location F040H as a counter.

A set of readings is stored in memory locations starting from F000H and last reading is FFH. Write a program to check each byte in the string and save the bytes in the range of (100)d to (150)d (both inclusive) in memory location starting from F020H. Also store number of bytes in a given range at F01FH memory location. A bar code scanner scans the boxes being shipped from the loading dock and records all the codes in computer memory. The end of data is indicated by 00H. The code 10100011(A3H) is assigned to 19 TV sets. Write a program to counter the number of 19 TV sets that were shipped from given data. A set of five readings is stored in memory locations starting at FF50H. Sort the readings in ascending order.

ATMIYA INSTITUTE OF TECHNOLOGY & SCIENCE, RAJKOT

6.1

You might also like