home *** CD-ROM | disk | FTP | other *** search
- 10 rem******************************
- 20 rem
- 30 rem disk commands demo progs
- 40 rem
- 50 rem******************************
- 60 rem
- 100 print "[147]"
- 110 print:print tab(10);"direct access demo"
- 120 print:print tab(10);"[158]1. program trace"
- 130 print:print tab(10);"2. read name"
- 140 print:print tab(10);"3. change name"
- 150 print:print tab(10);"4. show bytes free"
- 160 print:print tab(10);"5. read name(again)
- 165 [153]:[153]
- 170 [161] i$:[139] i$[178]"" [167] 170
- 180 [139] i$[179]"1" [176] i$[177]"5"[167] 170
- 190 [145] [197](i$) [141] 500,600,700,800,900
- 192 [153]:[153] [163]10);"any key to continue"
- 195 [161] i$:[139] i$[178]"" [167] 195
- 200 [137] 100
- 493 [143]
- 495 [143] read links
- 497 [143]
- 500 [159] 8,8,15:[143] open the command channel
- 510 [159] 4,8,4,"#":[143] open direct access file
- 520 [133] "track and sector please";tr,se
- 530 [152]8,"u1:"4;0;tr;se:[143] read contents of track/sector into buffer
- 540 [161]#4,t$,s$:[143] read first two bytes into buffer
- 550 tr[178][198](t$[170][199](0)):se[178][198](s$[170][199](0)):[143] make sure value is integer
- 560 [139] tr[178]0 [167] [160] 4:[160] 8:[142]:[143] end of links
- 570 [153] "track number is: ";tr;" sector is: ";se
- 580 [137] 530:[143] get next link
- 590 [143]
- 593 [143] read disk name
- 595 [143]
- 600 [159] 8,8,15:[143] open the command channel
- 610 [159] 4,8,4,"#":[143] open direct access file
- 620 [152]8,"u1:"4;0;18;0:[143] read contents of desired track/sector
- 630 [152]8,"b-p:"4;144:[143] point to where you want to read from
- 635 [153] "disk name: ";
- 640 [129] x[178]1 [164] 16:[143] length of filename
- 650 [161]#4,x$:[139] x$[178][199](160)[167] 670:[143] if shifted space end
- 660 [153] x$;:[130]: [143] print out and get next letter
- 670 [153]:[160] 4:[160] 8:[143] end
- 680 [142]
- 690 [143]
- 695 [143] change name
- 697 [143]
- 700 [159] 8,8,15:[143] open the command channel
- 710 [159] 4,8,4,"#":[143] open direct access file
- 720 [152]8,"u1:"4;0;18;0:[143] read contents of desired track/sector
- 730 [152]8,"b-p:"4;144:[143] point to where you want to read from
- 732 [153] "old name: ";
- 735 [129] x[178]1 [164] 16:[161]#4,x$:[139] x$[178][199](160) [167] x[178]16:[137] 739
- 737 [153] x$;
- 739 [130] x:[153]:[153]
- 740 [133] "enter new name";x$:[139] [195](x$)[177]16 [167] 740
- 750 [139] [195](x$)[179]16[167] x$[178]x$[170][199](160):[137] 750:[143] pad out name
- 755 [152]8,"b-p:"4;144:[143] point to where you want to write to
- 760 [152]4,x$;:[143] change buffer contents
- 770 [152]8,"u2:"4;0;18;0:[143] write back to disk
- 780 [152]8,"i":[160] 4:[160] 8:[142]
- 790 [143]
- 795 [143] free bytes
- 797 [143]
- 800 [159] 8,8,15
- 810 [152]8,"m-r"[199](250)[199](2)
- 820 [161]#8,x$:[139] x$[178]"" [167] x$[178][199](0)
- 830 [152]8,"m-r"[199](252)[199](2)
- 840 [161]#8,y$:[139] y$[178]""[167] y$[178][199](0)
- 850 [153] [198](x$)[170]256[172][198](y$);" blocks free"
- 860 [160] 8:[142]
- 890 [143]
- 895 [143] disk name 2
- 897 [143]
- 900 [159] 8,8,15
- 910 [152]8,"m-r"[199](144)[199](7)[199](16)
- 920 [132]8,x$
- 930 [153] "disk name: ";x$
- 940 [160] 8
- 950 [142]
-