Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
1.3 kB
5
Indexable
Never
ORG 0000H

MOV TMOD, #01H

BACK:  MOV TL0, #01AH

MOV TH0, #0FFH

SETB TR0

AGAIN: JNB TF0, AGAIN

CLR TR0

CPL P2.7

CLR TF0

SJMP BACK

 

 

 

 

 

ORG 0000H

MOV TMOD, #10H

REPEAT: MOV R0,#21

CPL P1.7

BACK: MOV TL1, #00H

MOV TH1, #00H

SETB TR1

AGAIN: JNB TF1, AGAIN

CLR TR1

CLR TF1

DJNZ R0, BACK

SJMP REPEAT

 

 

 

 

 

ORG 000H

REPEAT: MOV TMOD, #60H

MOV TH1, #0

SETB P3.5

AGAIN: SETB TR1

BACK:MOV A, TL1

MOV P1, A

JNB TF1, BACK

CLR TR1

CLR TF1

SJMP REPEAT

 

ORG 000H

REPEAT: MOV TMOD, #15H

SETB P3.4

MOV TL0, #00

MOV TH0, #00

SETB TR0

MOV R0,#21

AGAIN: MOV TL1,#00

MOV TH1, #00

SETB TR1

BACK: JNB TF1, BACK

CLR TF1

CLR TR1

DJNZ R0, AGAIN

MOV A, TL0

MOV P1,A

MOV A, TH0

MOV P2,A

SJMP REPEAT

END

 

 

 

 

 

MOV TMOD,#20H

MOV TH1,#-3H

MOV SCON,#40H

SETB TR1

AGAIN: MOV A,#'V'

ACALL TRANS

MOV A,#'I'

ACALL TRANS

MOV A,#'T'

ACALL TRANS

MOV A,#' '

ACALL TRANS

SJMP AGAIN

 

TRANS: MOV SBUF,A

HERE: JNB TI,HERE

CLR TI

RET 

 

 

 

 

 

MOV TMOD, #20H

MOV TH1,#-6H

MOV SCON,#50H

SETB TR1

HERE: JNB RI,HERE

MOV A, SBUF

MOV P1,A

CLR RI

SJMP HERE