; Rokaado device pic16c505, lp_osc, mclr_off, wdt_off, protect_off org 10h cntl equ 1 cntm equ 1 cnth equ 1 cntx equ 1 tc equ 1 mask equ 1 mask1 equ 1 obuf equ 1 num equ 1 n1 equ 1 obit equ obuf.0 nobit equ obuf.1 test equ rc.3 but equ rb.3 cl equ 40 cm equ 10 ch equ 5 cx equ 144 org 0 jmp start retw 'Roka',0dh,0ah retw 'CS Sky Lark SM, 2001.' lup jmp pc+w retw 0feh,0feh,0feh,0 retw 0feh,0feh,0feh,0 retw 80h,80h retw 0feh,07eh,0feh,80h retw 0feh,07eh,0feh,80h retw 0feh,07eh,0feh,80h retw 80h,0 retw 0beh,80h,0bch,0 retw 0b8h,80h,0b0h,0 retw 0a0h,80h,80h,0 retw 80h,80h,80h,0 lsw jmp pc+w retw 0,2,4,8,10h retw 20h,40h,81h lmin jmp pc+w retw 0c2h,0c4h,0c8h,0d0h,0e0h,0c2h button setb test jmp $+1 nop clrb test snb but jmp button :wait jnb but,:wait ret init mov rc,#2 mov w,#0c0h tris rc mov w,#88h option mov w,/rb and w,#7 call lsw mov mask,w mov num,#cl+1 mov nl,#ch+1 mov cntl,#cl mov cntm,#cm mov cnth,#ch mov cntx,#cx ret start call init call button mov w,#0 call lmin mov mask1,w out mov w,/cntl add w,num call lup and w,mask and w,mask1 setb obit clrb nobit snz clrb obit snz setb nobit mov w,obuf mov rc,w count dec cntl jnz padl nop mov cntl,#cl dec cntm jnz padm mov cntm,#cm dec cnth jnz padh mov cnth,#ch dec cntx jnz padx mov w,rb sleep padl jmp $+1 jmp $+1 nop padm jmp $+1 jmp $+1 nop padh mov w,#4 snb obit xor rc,w jmp $+1 padx mov w,/cnth add w,nl call lmin mov mask1,w tim mov tc,#196 :loop mov w,#4 snb obit xor rc,w djnz tc,:loop nop csal sb cntl.5 jmp $+1 jmp out