Created
May 27, 2017 10:59
-
-
Save przemyslawjanpietrzak/831ae476f36fa82a709269670a5e3f65 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$MOD52 | |
ORG 00H | |
JMP START | |
ORG 03H | |
CALL DELAY | |
CPL TR0 | |
RETI | |
ORG 0BH | |
CALL Z | |
WY: | |
RETI | |
START: | |
MOV IE,#83H | |
SETB TR0 | |
MOV TMOD,#01H | |
MOV R0,#00000000B | |
MOV R1,#01010000B | |
MOV R2,#00100000B | |
MOV R3,#00110000B | |
WYSWIETL: | |
MOV P2,R0 | |
CALL DELAY2 | |
MOV P2,R1 | |
CALL DELAY2 | |
MOV P2,R2 | |
CALL DELAY2 | |
MOV P2,R3 | |
CALL DELAY2 | |
JMP WYSWIETL | |
Z: | |
INC R4 | |
CJNE R4,#3,WY | |
MOV R4,#0 | |
INC R0 | |
CJNE R0,#00001010B,WY | |
MOV R0,#00000000B | |
INC R1 | |
CJNE R1,#01011010B,WY | |
MOV R1,#01010000B | |
INC R2 | |
CJNE R2,#00101010B,WY | |
MOV R2,#00100000B | |
INC R3 | |
CJNE R3,#001101010B,WY | |
MOV R3,#00110000B | |
RET | |
DELAY: | |
MOV R5,#255 | |
DJNZ R5,$ | |
RET | |
DELAY2: | |
CALL DELAY | |
CALL DELAY | |
CALL DELAY |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
brak 'RET' w 'DELAY2' i 'END' na końcu całości