Assignment 3
1) Arithmetic and Logical Instructions
ii) Bit and Bit set Instructions
3) Data Transfer Programs
A set of eight data bytes is stored in the memory locations starting at 2100H. Check
each data byte for bits D7 and D0. If D7 or D0 is 1, reject the data byte; otherwise, store
the data bytes at memory locations starting at 2150H.
Data (H); 80, 52, E8, 78, f2, 67, 35, 62
A string of readings is stored in memory location, starting at 2100H. The end of
string is indicated by byte ODH. Write a program to check each byte in the string,
and save the bytes between the range of 30H to 35H (both inclusive) in memory
locations starting form 2150H.
Data(H); 35, 27, 93, 32, 31, 73, 24, 30, 39, 0D, 42, 43
A Set of data is stored as unpacked (Signal Digit) BCD numbers in memory form
2000 H. Write a program to look up the common cathode LED code for each reading
and store the code from 2110H onwards.
A string of 20 data bytes is stored from memory location 2100H. The string includes
some blanks (bytes with zero value) Write a program to eliminate the blanks from
the string.
Data(H)' F2, 00, 7C, 00, 39, 00
Write a program to add the following data bytes stored in memory locations starting
from 2100H, and store the sum at 2150H. If carry is generated store 00H at 2150H.
Data(H); 32, 47, 39, 22, f3, D7
A set of eight readings is stored in the memory location starting at 2150H. Write a
program to check whether a byte 40H exists in the set. If it does, stop checking and
store it at 2160H, otherwise store 00H
4) Logical Instructions
'10' numbers are stored at consecutive memory locations starting from 2100H.
Rearrange the numbers in ascending order.
10 numbers are stored at consecutive memory locations starting from 2100H.
Rearrange the numbers in descending order.