Skip to content

Instantly share code, notes, and snippets.

@przemyslawjanpietrzak
Created May 27, 2017 10:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save przemyslawjanpietrzak/831ae476f36fa82a709269670a5e3f65 to your computer and use it in GitHub Desktop.
Save przemyslawjanpietrzak/831ae476f36fa82a709269670a5e3f65 to your computer and use it in GitHub Desktop.
$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
@Herdu
Copy link

Herdu commented May 27, 2017

brak 'RET' w 'DELAY2' i 'END' na końcu całości

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment