Professional Documents
Culture Documents
LABMANUAL
Contents
I. PROGRAMMING
1. Data Transfer - Block move, Exchange, Sorting, Finding largest element in an array.
3. Counters.
6. Programs to generate delay, Programs using serial port and on- Chip timer/ counter.
1. Write an ALP to move block of data bytes present in internal memory with starting address
10h and ending address 20h to the destination memory with starting address 30h.
(Without overlap).
2. Write an ALP to move block of data bytes present in internal memory with starting address
10h and ending address 20h to the destination memory with starting address 15h.
(With overlap).
Address Label Mnemonic Comment
9000 MOV R1,#10H Starting addr of src
MOV R2,#20H Ending addr of src
MOV R0,#15H Starting addr of desti
CLR C
MOV A,R2 Determination of size And
SUBB A,R1 stored in R2
MOV R2,A
MOV A,R1
ADD A,R2 End addr of src
MOV R1,A
MOV A,R0
ADD A,R2 End addr of desti
MOV R0,A
INC R2
LOOP MOV A,@R1
Copy data byte
MOV @R0,A
DEC R1
DEC R0
DJNZ R2,LOOP
LCALL 0003
3. Write an ALP to move block of data bytes present in external memory with starting address
8000h to the destination memory with starting address 9000h and size of array is 10h.
4. Write an ALP to exchange block of data bytes present in external memory. Starting address
of first is 8000h and starting address of other block 9000h and size of array is 10h.
6. Write an ALP to add ‘n’ bytes stored in external RAM (Starting address 9000 and no of bytes
is 10 or 0Ah)
10. Write an ALP to illustrate logical operations like AND, OR, NOT and XOR
12. Write an ALP to subtract 2 byte number from another 2 byte number.
14. Write an ALP to illustrate hexadecimal down counter with a given staring and ending value.
16. Write an ALP to illustrate decimal down counter with a given staring and ending value.