Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $MOD52
- JMP main
- ORG 0BH
- ;DJNZ R0, powrot
- call wyswietl
- CALL sekunda
- reti
- main:
- MOV TMOD, #01H
- MOV TCON, #00010000B
- MOV R0, #00000010B
- MOV R1, #00000000B
- MOV R2, #00010000B
- MOV R3, #00100000B
- MOV R4, #00110000B
- MOV IE, #0FFH
- JMP nic
- sekunda:
- INC R1
- MOV R0, #00110010B
- CJNE R1, #00001010B, powrot
- CALL sekunda2
- MOV R1, #00000000B
- ret
- sekunda2:
- INC R2
- CJNE R2, #00010110B, powrot
- call minuta
- MOV R2, #00010000B
- ret
- minuta:
- inc R3
- CJNE R3, #00101010B, powrot
- call minuta2
- MOV R3, #00100000B
- ret
- minuta2:
- inc R4
- CJNE R4, #00110110B, powrot
- MOV R1, #00000000B
- MOV R2, #00010000B
- MOV R3, #00100000B
- MOV R4, #00110000B
- ret
- wyswietl:
- MOV P2, R1
- call delay
- MOV P2, R2
- call delay
- MOV P2, R3
- call delay
- mov P2, R4
- call delay
- ret
- delay:
- mov R5, #0ffh
- loop1:
- mov B, #00fh
- looop1:
- djnz B, looop1
- djnz R0, loop1
- ret
- powrot:
- MOV IE, #0FFH
- RETI
- nic:
- NOP
- JMP nic
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement