rem Toto je pokusny program. rem citac CU- pinC.0 rem vzstup port B b3=1 b0=0 b6=0 b7=0 gosub SetPortB start: if pinC.0=1 then;cekani na nabeznou hranu if b3=0 then b6=b6+1 if b6>9 then b6=0 b7=b7+1 if b7>9 then b7=0 endif endif b0=b7*16+b6 gosub SetPortB end if b3=1 else b3=0 end if goto start SetPortB: ;podprogram nastav? na portu B piny podle prom?nn? b0 poke 80,b1 b1=b0 AND %00000001 if b1=1 then high b.0 else low b.0 end if b1=b0 AND %00000010 if b1=2 then high b.1 else low b.1 end if b1=b0 AND %00000100 if b1=4 then high b.2 else low b.2 end if b1=b0 AND %00001000 if b1=8 then high b.3 else low b.3 end if b1=b0 AND %00010000 if b1=16 then high b.4 else low b.4 end if b1=b0 AND %00100000 if b1=32 then high b.5 else low b.5 end if b1=b0 AND %01000000 if b1=64 then high b.6 else low b.6 end if b1=b0 AND %10000000 if b1=128 then high b.7 else low b.7 end if peek 80,b1 return