Assignment 2
Assignment 2
Method 2
MNEMONIC COMMENT
Method 1
MNEMONIC COMMENT
Method 2
MNEMONIC COMMENT
MNEMONIC COMMENT
Method 2
MNEMONIC COMMENT
Method 2
MNEMONIC COMMENT
Method 2
MNEMONIC COMMENT
Method 1
MNEMONIC COMMENT
Method 1
MNEMONIC COMMENT
Method 1
MNEMONIC COMMENT
Method 2
MNEMONIC COMMENT
Method 1
MNEMONIC COMMENT
Method 1
MNEMONIC COMMENT
Method 1
MNEMONIC COMMENT
Method 1
MNEMONIC COMMENT
Method 1
Since
LABEL MNEMONIC COMMENT
MOV DPTR,#0100H ; Initializing DPTR to source
address 0100H
MOV R0,#03H ; Count=3
MOV R1,#20H ;Initializing R1 to destination
address 20H
STORE: MOV A,00H
MOVC A,@A+DPTR ; Contents of source address
moved to A
MOV @R1,A ; Contents of A moved to
destination address
INC DPTR ; Increment source address
INC R1 ; Increment destination address
DJNZ R0,STORE ; Continue for three successive
locations
23. Copy the data on the pins of Port 2 to the Port 2 latch
Method 1
MNEMONIC COMMENT
Method 1
MNEMONIC COMMENT
Method 2
MNEMONIC COMMENT
Method 1
MNEMONIC COMMENT
Method 1
MNEMONIC COMMENT
Method 2
MNEMONIC COMMENT
Method 1
MNEMONIC COMMENT
28. Swap the contents of register bank 3 with register bank 0 as follows: R0 of bank3
with R0 of bank 0, R1 of bank3 with R1 of bank 0, and so on, until R7 of bank3 is
swapped with R7 of bank 0.
Method 1