home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 149
/
149.d81
/
skeleton
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
3KB
|
88 lines
10 parameters=828:ph=int(pa/256):pl=par-256*ph
20 ft=120*256:fh=int(ft/256):fl=ft-256*fh
900 rem print message
910 x1=2:x2=37:y1=22:y2=22:sc=160:bc=7:gosub2200:poke199,1:poke646,7
915 poke211,20-(len(a$)/2):poke214,22:sys58732:printa$:return
919 rem print message and wait for key in k$
920 gosub910:gosub3100:return
2100 x1=0:x2=39:y1=0:y2=24:sc=255:bc=15:gosub2200
2110 a$="[210]eview [195]hanged [196]irectory":gosub2000:mode=2:gosub1030:return
2199 rem box
2200 pokeparms,x1:pokeparms+1,x2:pokeparms+2,y1:pokeparms+3,y2:pokeparms+4,sc
2210 pokeparms+5,bc:poke781,pl:poke782,ph:sysmb+105:return
2299 rem move cursor
2300 poke211,x:poke214,y:sys58732:return
2499 rem getword
2500 pokepa,tx:pokepa+1,curs:pokepa+2,limit:pokepa+3,len(w$)
2510 fori=1tolen(w$)
2520 pokepar+3+i,asc(mid$(w$,i,1)+chr$(0)):next:pokepa+3+i,0
2530 poke781,pl:poke782,ph:sysmb+150:w$="":gl=peek(780):ifgl=0then:return
2540 n=peek(782)*256+peek(781):fori=1togl:w$=w$+chr$(peek(n-1+i)):next
2550 return
2599 rem frame
2600 pokeparms,x1:pokeparms+1,x2:pokeparms+2,y1:pokeparms+3,y2:pokeparms+4,fc
2610 poke781,pl:poke782,ph:sysmb+108:return
2699 rem lattice
2700 pokeparms,x1:pokeparms+1,x2:pokeparms+2,y1:pokeparms+3,y2:pokeparms+4,s1
2710 pokepa+5,s2:pokepa+6,c1:pokepa+7,c2:poke781,pl:poke782,ph:sysmb+102:return
2799 rem shade
2800 pokeparms,x1:pokeparms+1,x2:pokeparms+2,y1:pokeparms+3,y2
2810 poke781,pl:poke782,ph:sysmb+192:return
2899 rem copy tile
2900 pokepa,fl:pokepa+1,fh:pokepa+2,t:pokepa+3,c
2910 poke781,pl:poke782,ph:sysmb+111:return
2999 rem char swap
3000 pokeparms,c1:pokeparms+1,c2:pokeparms+2,c
3010 poke781,pl:poke782,ph:sysmb+186:return
3099 rem brancher
3100 k$=k$+chr$(0):fori=1tolen(k$):pokepa-1+i,asc(mid$(k$,i,1)):next
3105 poke781,pl:poke782,ph
3110 sysmb+195:item=peek(253)
3120 return
3199 rem screen to menu
3200 pokepa,y:pokepa+1,x1:pokepa+2,x2:pokepa+3,mi:pokepa+4,mc:pokepa+5,mh
3205 ifright$(hot$,1)<>chr$(0)thenho$=ho$+chr$(0)
3210 pokepa+6,len(hot$)
3220 fori=1tolen(hot$):pokepa+6+i,asc(mid$(hot$,i,1)):next
3230 poke781,pl:poke782,ph:poke34,pl:poke35,ph:sysmb+162:it=peek(253):f%=it
3240 return
3299 rem get directory set dir$ and loc
3300 fori=1tolen(dir$):pokepa-1+i,asc(mid$(dir$,i,1)):next:i=i-1
3310 pokepa+i,d:pokepa+i+2,int(loc/256):pokepa+i+1,loc-(256*peek(pa+i+2))
3320 poke781,pl:poke782,ph:poke780,len(di$):sysmb+138:f%=peek(254)*256+peek(253)
3330 f%=f%+1:return
3399 rem file requestor
3400 pokepa,x:pokepa+1,y1:pokepa+2,y2:pokepa+3,mr:pokepa+4,mc:pokepa+5,mh
3410 pokepa+6,ms:pokepa+7,mode
3420 poke781,pl:poke782,ph:poke780,len(di$):sysmb+144:ifmodethenreturn
3430 w$="":gl=peek(780):ifgl=0then:return
3440 n=peek(782)*256+peek(781):fori=1togl:w$=w$+chr$(peek(n-1+i)):next:return
3499 rem index items
3500 poke782,item/256:poke781,item-256*peek(782):sysmb+132
3510 w$="":gl=peek(780):ifgl=0then3530
3520 n=peek(782)*256+peek(781):fori=1togl:w$=w$+chr$(peek(n-1+i)):next
3530 f%=peek(254)*256+peek(253):return
3699 rem scroll down
3700 pokeparms,x1:pokeparms+1,x2:pokeparms+2,y1:pokeparms+3,y2
3710 poke781,pl:poke782,ph:sysmb+117:return
3799 rem scroll up
3800 pokeparms,x1:pokeparms+1,x2:pokeparms+2,y1:pokeparms+3,y2
3810 poke781,pl:poke782,ph:sysmb+120:return
4999 rem instant page
5000 poke53280,0:poke53281,0:x1=0:x2=39:y1=0:y2=24:fc=14:gosub2600:rem frame
5010 x1=1:x2=38:y1=1:y2=23:s1=95:s2=105:c1=l1:c2=l2:gosub2700:rem lattice
5020 x1=3:x2=36:y1=2:y2=4:fc=7:gosub2600
5030 x1=4:x2=35:y1=3:y2=3:sc=160:bc=1:gosub2200
5040 poke214,3:poke211,20-(len(t$)/2):sys58732:poke199,1:poke646,1:printt$
5050 a=0:fori=1toni:iflen(a$(i))>athena=len(a$(i)):rem find longest item
5060 next
5070 x1=20-(a/2)-3:x2=x1+a+3:y1=15-(ni/2)-3:y2=y1+ni+3:gosub2800
5075 x1=x1+1:x2=x2+1:y1=y1-1:y2=y2-1:gosub2600
5080 x1=x1+1:x2=x2-1:y1=y1+1:y2=y2-1:sc=160:bc=3:gosub2200
5090 my=y1:mx=x1+1:m2=x2:fori=1toni:x=mx:y=my+i:gosub2300:poke646,3:poke199,1
5100 printa$(i):next
5110 ifms$=""thena$="[195][210][211][210]/[210][197][212][213][210][206] [212]o [211]elect":goto5120
5115 a$=ms$:ms$=""
5120 gosub910
5130 mi=ni:y=my+1:x1=mx-1:x2=m2:mc=3:mh=1:gosub3200:return