;-----------------------------------------------------------------
BANK		macro	N
			mov psw,#(&N shl 3)
			endm
;-----------------------------------------------------------------
			cseg at 0000h
			jmp Start
;-----------------------------------------------------------------
Prg0		segment code
			rseg Prg0
;-----------------------------------------------------------------
Tabulka:	db	10000000b,01000000b,00100000b,00010000b
			db	00001000b,00000100b,00000010b,00000001b
			db	00000001b,00000010b,00000100b,00001000b
			db	00010000b,00100000b,01000000b,10000000b
			db	11001100b,00110011b,11001100b,00110011b
			db	11001100b,00110011b,11001100b,00110011b
			db	11110000b,00001111b,11110000b,00001111b
			db	11110000b,00001111b,11110000b,00001111b
			db	11111111b,00000000b,00000000b,00000000b
			db	'*'
;-----------------------------------------------------------------
Prg1		segment code
			rseg Prg1
;-----------------------------------------------------------------
Start:		mov r0,#7fh			;Pocet byte mazanej pamati v RAM ...
			clr a				;Tymto prepisem pamat ...
Mazem:		mov @r0,a			;Teraz vymazem konkretny byte ....
			djnz r0,Mazem		;Opakujem skok na Mazem pokial R0<>0
Zobrazuj:	mov dptr,#Tabulka	;Kde je Tabulka ???
Cykluj:		clr a
			movc a,@a+dptr		;Nacitam prvy byte z Tabulky
			cjne a,#'*',Pokracuj
			jmp Zobrazuj
;-----------------------------------------------------------------
Prg2		segment code
			rseg Prg2
;-----------------------------------------------------------------
Pokracuj:	mov P1,a			;Zobrazim na LED pripravku
			call Delay			;Oneskorim to ....
			inc dptr			;Posuniem sa na dalsi byte v Tabulke
			cjne a,#'*',Cykluj	;Ak A<>'*' tak zobrazujem !!!
			jmp Zobrazuj
;-----------------------------------------------------------------
Prg3		segment code
			rseg Prg3
;-----------------------------------------------------------------
Delay:		BANK 3				;Prepnem sa na inu banku registrov
			mov r0,#0FFh		;Oneskorim to o asi 255*255 us
			mov r1,#0FFh
CCC:		djnz r1,$
			djnz r0,CCC
			BANK 0				;Vratim sa na povodnu banku registrov
			ret						
;-----------------------------------------------------------------

			end