Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as text by radek ( 17 years ago )
org 0
jmp start

org 0bh
jmp stana

org 30h
start:  mov IE,#10000010b
        mov TMOD,#1
video   equ 20h
        mov dptr,#tabhod
        mov video,#0
        mov video+1,#0
        mov video+2,#0
        mov TH0,#High(-5000)
        mov TL0,#Low(-5000)
        mov R1,#11101111b
        mov R0,#20h
        setb TR0

zpet:   call klaves
        cjne a,#0,kuk2
	jmp zpet
kuk2:   call ejhle
	cjne r6,#10,kuk
 	jmp zpet
kuk:    call skladac
tut:	call klaves
	cjne a,5,zpet3
	jmp tut
zpet3:  mov r6,#100
zpet4:	mov r4,#250
	djnz r4,$
	djnz r6,zpet4
	call klaves
	cjne a,5,zpet
	jmp tut



klaves: mov R7,#11011111b
       	mov P2,R7
zp:     mov A,P2
	cjne A,7,dal
	rl a
	mov R7,A
	cjne R7,#11111110b,lup1
	mov a,#0
	ret
lup1:   mov P2,A
	jmp zp
dal:	ret

stana:  push acc
	mov th0,#high(-5000)
        mov tl0,#low(-5000)
        mov a,R1
        anl a,#240
        orl a,@r0
        mov P1,a
        mov a,R1
        rl a
        mov R1,a
        inc r0
        cjne A,#01111111b,lup2
        mov R1,#11101111b
        mov r0,#20h
lup2:	pop acc
	reti

ejhle:	mov R5,A
	mov R6,#0
lup:	mov A,R6
	movc A,@A+dptr
	cjne R6,#10,tutu
	ret
tutu:	cjne A,5,dal2
	ret
dal2:	inc R6
	jmp lup

skladac:mov video+2,video+1
	mov video+1,video
	mov video,r6
	ret






tabhod: DB 10111110b
	DB 11010111b
	DB 10110111b
	DB 01110111b
	DB 11011011b
	DB 10111011b
	DB 01111011b
	DB 11011101b
	DB 10111101b
	DB 01111101b
	DB 01111101b

end

 

Revise this Paste

Your Name: Code Language: