You are on page 1of 1

ORG 0000H /*Starting address, to indicate the beginning of the address */

AGAIN: MOV A,#0FFH /* Move 255 to Accumlator*/


MOV P2,A /* Move that data to Port 2*/
ACALL DELAY /* Call delay */
MOV A,#00H /* Move 0 to Accumlator */
MOV P2,A /* Move that data to Port 2*/
ACALL DELAY /* Call Delay */
SJMP AGAIN /* Short Jump to Again */

DELAY: MOV R5,#05FH /* move 5fh data to Temp Register */

L2: MOV R4,#0FFH /* move ffh data to Temp Register */


L1: DJNZ R4, L1 /* Decrement R4 and Jump if not equal to zero to L1 */
DJNZ R5, L2 /* Decrement R5 and Jump if not equal to zero to L2 */
RET /* Return to main program */
END /* End Program */

You might also like