+Torrax Posted January 8 Share Posted January 8 Okay here is a Directory program you can type and run from BASIC or XB. I suggest using a file name of "DIR" or "!DIR". The second one usually keeps it at the top of your listings. 100 CALL CLEAR 110 INPUT "DISK DRIVE (1-3):":D 120 D=INT(D) 130 IF(D<1)+(D>3)THEN 110 140 OPEN #1:"DSK"&STR$(D)&".",INPUT ,RELATIVE,INTERNAL 150 INPUT #1:A$,FT,FS,RL 160 DISPLAY :"DSK";STR$(D);".";A$; 170 DISPLAY TAB(17);"SEC:";TAB(21);SEG$(" ",1,4-LEN(STR$(FS+2)))&STR$(FS+2) 180 DISPLAY :"AVAILABLE:";STR$(RL);TAB(17);"USED:";STR$(FS-RL) 190 DISPLAY :"FILENAME SIZE TYPE P":"---------- ---- ------ -"; 200 INPUT #1:A$,FT,FS,RL 210 IF LEN(A$)=0 THEN 290 220 DISPLAY :A$;TAB(12);SEG$(" ",1,4-LEN(STR$(FS)))&STR$(FS); 230 DISPLAY TAB(17);SEG$("D/FD/VI/FI/VPGM",(ABS(FT)-1)*3+1,3); 240 IF ABS(FT)=5 THEN 260 250 DISPLAY SEG$(" ",1,3-LEN(STR$(RL)))&STR$(RL); 260 IF FT>0 THEN 200 270 DISPLAY TAB(24);"Y"; 280 GOTO 200 290 CLOSE #1 300 END Line 170 and 220 have 4 spaces between the quotes in the SEG$. Line 190 has 10 minuses, space, 4 minuses, space, 6 minuses, space, and 1 minus in the DISPLAY. Line 250 has 3 spaces between the quotes in the SEG$. ... enjoy ... 5 Quote Link to comment https://forums.atariage.com/topic/359289-yet-another-diretory-program-for-basxb/ Share on other sites More sharing options...
+jedimatt42 Posted January 8 Share Posted January 8 "D/FD/VI/FI/VPGM" What do your file type acronyms mean? Is D "DISPLAY VARIABLE" ? And why is there a V on VPGM? Mostly just curious... Everyone comes at this machine from a different perspective. There is an additional file type not covered here, but since this is restricted to DSK1-3, we don't kneed to worry about sub-directories. Quote Link to comment https://forums.atariage.com/topic/359289-yet-another-diretory-program-for-basxb/#findComment-5383263 Share on other sites More sharing options...
+Torrax Posted January 8 Author Share Posted January 8 Broken down to 3 char chunks D/F D/V I/F I/V PGM using SEG$ based on file type. This uses standard disk file types (non sub-dirs). You can modify it how ever you want to support sub-dirs. Quote Link to comment https://forums.atariage.com/topic/359289-yet-another-diretory-program-for-basxb/#findComment-5383273 Share on other sites More sharing options...
+Torrax Posted January 8 Author Share Posted January 8 - fixed error in line 230 - clarification on formatting Updated my first post on my tablet. Not use to editing this way. 1 Quote Link to comment https://forums.atariage.com/topic/359289-yet-another-diretory-program-for-basxb/#findComment-5383463 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.