Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PROG SEGMENT CODE
- key BIT P3.2
- CSEG AT 0
- JMP def
- RSEG PROG
- def:
- MOV R1, 0x00
- MOV R0, #01
- MOV TMOD, #01
- SJMP st
- st:
- JB key, $
- SETB TR0
- SJMP petla
- petla:
- MOV TH0, #76
- MOV TH0, #01
- JNB TF0, $
- CPL TF0
- ADD A, #01
- JNB key, petla
- MOV R1, A
- SJMP czek
- czek:
- MOV TH0, #76
- MOV TH0, #01
- JNB TF0, $
- CPL TF0
- SUBB A, #01
- JNZ czek
- CLR TR0
- SJMP swiec
- swiec:
- MOV A, R0
- XRL P2, A
- MOV B, #02
- MUL AB
- MOV R0, A
- MOV A, #00
- SETB TR0
- MOV A, R1
- SJMP czek
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement