You are on page 1of 6

org 0h jmp start porta portb portc cw equ 0E000h equ 0E001h equ 0E002h equ 0E003h

start: mov a,#80h mov DPTR,#cw movx @DPTR,a mulai: mov A,#10000000b mov DPTR,#porta movx @DPTR,A acall tunda mov A,#01000000b mov DPTR,#porta movx @DPTR,A acall tunda mov A,#00100000b mov DPTR,#porta movx @DPTR,A acall tunda mov A,#00010000b mov DPTR,#porta movx @DPTR,A acall tunda mov A,#00001000b mov DPTR,#porta movx @DPTR,A acall tunda mov mov A,#00000100b DPTR,#porta

movx @DPTR,A acall tunda

mov A,#00000010b mov DPTR,#porta movx @DPTR,A acall tunda mov A,#00000001b mov DPTR,#porta movx @DPTR,A acall tunda sjmp mulai tunda: ulang2: ulang1: ulang: cjne inc cjne inc cjne ret END mov R7,#0 mov R6,#0 mov R5,#0 inc R5 R5,#20H,ulang R6 R6,#20H,ulang1 R7 R7,#20H,ulang2

org 0h jmp start porta portb portc cw equ 0E000h equ 0E001h equ 0E002h equ 0E003h

start: mov mov movx mulai:

a,#80h DPTR,#cw @DPTR,a

mov A,#10000001b mov DPTR,#porta movx @DPTR,A acall tunda mov A,#01000010b mov DPTR,#porta movx @DPTR,A acall tunda mov A,#00100100b mov DPTR,#porta movx @DPTR,A acall tunda mov A,#00011000b mov DPTR,#porta movx @DPTR,A acall tunda mov A,#00011000b mov DPTR,#porta movx @DPTR,A acall tunda mov A,#00100100b mov DPTR,#porta movx @DPTR,A acall tunda

mov A,#01000010b mov DPTR,#porta movx @DPTR,A acall tunda mov A,#10000001b mov DPTR,#porta movx @DPTR,A acall tunda

sjmp mulai tunda: ulang2: ulang1: ulang: cjne inc cjne inc cjne ret END mov R7,#0 mov R6,#0 mov R5,#0 inc R5 R5,#20H,ulang R6 R6,#20H,ulang1 R7 R7,#20H,ulang2

org 0h jmp start porta portb portc cw equ 0E000h equ 0E001h equ 0E002h equ 0E003h

start: mov a,#80h mov DPTR,#cw movx @DPTR,a mulai: mov A,#00011000b mov DPTR,#porta movx @DPTR,A acall tunda mov A,#00100100b mov DPTR,#porta movx @DPTR,A acall tunda mov mov movx A,#01000010b DPTR,#porta @DPTR,A

acall tunda mov A,#10000001b mov DPTR,#porta movx @DPTR,A acall tunda mov A,#10000001b mov DPTR,#porta movx @DPTR,A acall tunda mov A,#01000010b mov DPTR,#porta movx @DPTR,A acall tunda

mov A,#00100100b mov DPTR,#porta movx @DPTR,A acall tunda mov A,#00011000b mov DPTR,#porta movx @DPTR,A acall tunda sjmp mulai tunda: ulang2: ulang1: ulang: cjne inc cjne inc cjne ret END mov R7,#0 mov R6,#0 mov R5,#0 inc R5 R5,#20H,ulang R6 R6,#20H,ulang1 R7 R7,#20H,ulang2

You might also like