home *** CD-ROM | disk | FTP | other *** search
- 2 sys65418:mm=-1:poke650,128
- 5 gosub60100:clr:dim g$(2):poke198,.
- 10 def fnh(de)=int(de/256)
- 15 def fnl(dn)=dn-fnh(dn)*256
- 20 def fns(s)=16*int(s/10)+s-int(s/10)*10
- 25 def fnr(r)=(((peek(r)and112)/1.6)+(peek(r)and15))and127
- 30 def fnpm(s)=peek(56331)or128
- 35 def fnrp(r)=peek(56331)and128
- 50 hrs=56331:min=56330:sec=56329:ten=56328
- 60 sa=49152:rem change sa to relocate ml
- 70 sm=1050:cm=54272:gosub800
- 180 gosub700:gosub 900:sys(sa+104):pokesa+92,2
- 185 gosub800:goto500
- 200 h=fnr(hrs):print"enter the hour: [157][157]";:gosub1000:h=val(a$)
- 201 ifh<0orh>12thenprint"[145]";:goto200
- 202 poke hrs,fns(h)+fnrp(0)
- 205 w$="am":iffnrp(0) then w$="pm"
- 210 print"am or pm":print"--> [157][157]";:z8=-1:gosub1000:z8=.
- 211 w$=a$:ifw$<>"am"and w$<>"pm"andw$<>"a"andw$<>"p"thenprint"[145][145]";:goto210
- 212 ifw$="p"thenw$="pm"
- 213 ifw$="a"thenw$="am"
- 215 if w$="pm" then poke hrs,peek(hrs)or128
- 216 if w$="am" then poke hrs,peek(hrs)and255-128
- 220 m=fnr(min):print"enter the minute: [157][157]";:gosub1000:m=val(a$)
- 221 ifm<.orm>59thenprint"[145]";:goto220
- 222 poke min,fns(m)
- 230 s=fnr(sec):print"enter the second: [157][157]";:gosub1000:s=val(a$)
- 231 ifs<.ors>59thenprint"[145]";:goto230
- 232 poke sec,fns(s)
- 240 poke ten,0
- 490 gosub812
- 500 poke198,.:wait 198,1:get k$:ifk$=""then500
- 510 if k$="[136]" then 750
- 512 if k$="" then c=1050
- 515 if k$="" then c=sm+1
- 520 if k$="[157]" then c=sm-1
- 525 if k$="" then c=sm+40
- 530 if k$="[145]" then c=sm-40
- 532 if k$="[133]" then gosub700:goto200
- 533 if k$="[135]" then gosub600
- 535 if k$="[134]" then poke sa+92,(peek(sa+92)+1)and 15
- 540 if c>1023 and c<2011 then sm=c:gosub800:c=0
- 550 goto 500
- 600 b=b+1and3:if b=0 then 70
- 605 pokeu,peek(u)and254
- 610 b(1)=29:b(2)=38:b(3)=44:l(1)=10:l(2)=7:l(3)=4
- 615 poke sa+29,240
- 620 poke sa+30,b(b)
- 625 poke sa+94,l(b)
- 650 cm=54271:gosub800:goto985
- 700 print chr$(147):print:print tab(16)"the clock"
- 710 print tab(10)"by bennett cookson jr.":print:print
- 720 return
- 750 open15,8,15,"r0:hello connect=hello connect":input#15,er:close15
- 760 ifer<>63thenprint"enter sys65418 to disable clock.":end
- 770 sys65418:load"hello connect",8
- 800 restore:data 8,17,23,45,51,57,89
- 805 forx=1to7:read i:poke sa+i,fnl(sm):poke sa+i+1,fnh(sm):next
- 810 poke sa+96,fnl(sm+cm):poke sa+97,fnh(sm+cm)
- 812 gosub 700:ifmmthenmm=.:return
- 817 print" cursor controls to move clock":print
- 820 print" home to move clock to top":print
- 822 print" f1 to set time":print
- 825 print" f3 to change color":print
- 830 print" f5 to shorten time display":print
- 840 print" f7 to end program":print
- 850 return
- 900 i=sa
- 901 u=56334:pokeu,peek(u)and254:rem turn interrupts off
- 902 read a:if a=256 then 950
- 904 poke i,a:i=i+1:goto 902
- 906 data 170,74,74,74,74,9,48,153
- 908 data 26,4,200,138,41,15,9,48
- 910 data 153,26,4,200,169,58,153,26
- 912 data 4,200,96,160,0,32,20,192
- 914 data 162,1,173,11,220,41,128,240
- 916 data 2,162,16,138,153,26,4,200
- 918 data 169,13,153,26,4,200,169,32
- 920 data 153,26,4,200,173,11,220,170
- 922 data 41,16,32,1,192,173,10,220
- 924 data 32,0,192,173,9,220,32,0
- 926 data 192,173,8,220,41,15,9,48
- 928 data 153,26,4,169,1,160,13,153
- 930 data 26,216,136,208,250,76,49,234
- 932 data 120,169,27,141,20,3,169,192
- 934 data 141,21,3,88,96,256
- 950 poke sa+106,fnl(sa+27)
- 955 poke sa+111,fnh(sa+27)
- 960 read i,p: if i=-1 then 985
- 965 poke sa+i,fnl(sa+p)
- 966 poke sa+i+1,fnh(sa+p)
- 970 goto 960
- 980 data 30,20,67,1,73,0,79,0,-1,0
- 985 pokeu,peek(u)or1:return
- 1000 print"[164]";:fora=1to2:g$(a)=""
- 1010 geta$:ifa$=""then1010
- 1020 ifa$=chr$(13)then1060
- 1030 ifa$=chr$(20)and(a>1)thena=a-1:print"[157][157] [157][157][164]";:g$(a)="":goto1010
- 1035 if(z8)and(a$>="[193]"anda$<="[218]")thena$=chr$(asc(a$)-128):goto1050
- 1040 if(z8)and(a$>="a"anda$<="z")then1050
- 1042 if(z8)or(a$<"0"ora$>"9")then1010
- 1050 print"[157] [157]"a$;:poke212,.:print"[164]";:g$(a)=a$:next
- 1060 print"[157] ":a$="":forb=1toa-1:a$=a$+g$(b):next:return
- 60100 poke53280,5:poke53281,1
- 60105 print"[147][176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"chr$(142);
- 60110 fora=1to23:print"[221]"spc(38)"[221]";:next
- 60120 print"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189][157][148][192]";
- 60130 print"[149] loadstar presents:"
- 60140 print" clock"
- 60150 print" by bennett cookson jr."
- 60155 print" (c)opyright 1987"
- 60160 print"[129] press any key to continue."
- 60170 poke198,.:wait198,1:return
-