Problems
1. Load R5 with 25H and, R7 with 34H, add the contents of R5 & R7. add 12H to result.
2. Load R6, R1, R4 with 15H, 12H and F3H respectively, push these to stack.
3. Write a program to determine if R5 contains the value D. if so, put 55H in it, otherwise put 00H in
it.
4. Find the sum of values 79H, F5H and E2H. put sum to register R0 (low byte) and R5(high byte)
5. Write a program to (a) load accumulator with value 55H and (b) with complement the
accumulator 10 times.
6. Load 9B and A7 registers R0 and R1 respectively and add these numbers. If sum is greater than
FF, load with 01 otherwise store sum in A.
7. Write a program to get 8 bit data from P1 and sent it to ports P0, P2, P3 continuously.
8. Write a program to monitor the P1.3 bit. When it is high make low to high to low pulse on p1.3.
9. Write a program to copy the block of 10 bytes of data from RAM locations starting at 35H to
RAM location starting at 60H.
10. Write a program to see if RAM location 37H contains an even value if so send it to P2. if not make
it even, then send it to P2.
11. Write a program to add two 16 bit numbers. The numbers are 3CE7 H and 3B8DH. Place the sum
in R7 and R6; R6 should have lower byte.
12. Write a program to
(f) make P2 an input port
(g) to get a byte of hex data in the range of 00-FF H from P1 and convert it to decimal. Save
the digits in R7, R6 and R5, where the least significant digit is R7.
13. Read the test P1 to test whether it has the value 45H. if it does, send 99H to P2; otherwise clear
port P2.
14. Assume the lower 4 bit of P1 are connected to 4 switches. Write a program to send following
ASCII characters to P2 on the status of switches.
0000 ‘0’
0001 ‘1’
: :
: :
1111 ‘F’