Professional Documents
Culture Documents
1) Write an ALP to copy/transfer a block of data of size N from the address F100H to
F105H. N is stored at F0FFH. Note: The memory addresses may overlap.
2) Write an ALP to find the square of a number stored in D000H and store the answer in
D001H. Use lookup table for the same.
3) Write a subroutine to swap two numbers. The addresses of the numbers to be swapped are
stored in HL pair and DE pair.
Details of the subroutine:
Input: HL and DE store addresses
Output: Swapping of two numbers
Registers affected: None
Flags affected: None
4) Write an ALP to sort N numbers in ascending order.
Details:
N is stored in 1FFF(H)
The N numbers are stored 2000H onwards
5) Write a subroutine to multiply two numbers.
Details of the subroutine:
Inputs: two numbers in ACC and B
Output: Store answer in DE pair
Write a C program to toggle a LED every 500ms using timer interrupts and round robin
scheduling.
10) Write a program to send a string via the UART. Use the same specifications as (8) and
create a function send() which makes use of the send_char() function.
11) Write a program to receive a small case character from the UART port and return capital
case. Use polling for receiving the character.
12) Repeat program (10) for interrupt based receiving of characters from UART.