;+----------------------------------+›;| PROG NAME: DIRW.ACT |›;| VERSION #: 1.11-A |›;| AUTHOR: JON D. MELBO |›;|START DATE: 24-Oct-91 |›;|COMPL DATE: 30-Sep-92 |›;| LAST EDIT: 05-Sep-92 +---------------------------------------+›;| |›;|PURPOSE / FUNCTION: |›;| To provide an external command for SpartaDOS which will display a "wide" |›;| directory. The program is made to put two columns of directory on a____ |›;| 40-column screen, and four on an 80-column. It will read the SpartaDOS_ |›;| CL for any pathname or filespec mask that may be given._________________ |›;| ________________________________________________________________________ |›;| ________________________________________________________________________ |›;| ________________________________________________________________________ |›;| |›;|RELATED FILES LIST: |›;| GET_PARM.M65 - source for Get_Parm routine._____________________________ |›;| ________________________________________________________________________ |›;| ________________________________________________________________________ |›;| ________________________________________________________________________ |›;| ________________________________________________________________________ |›;| ________________________________________________________________________ |›;| ________________________________________________________________________ |›;| ________________________________________________________________________ |›;| |›;|ADDITIONAL COMMENTS: |›;| This version (1.11-A) is designed to use the Get_Parm routine which is__ |›;| developed under Mac/65, as opposed to version 1.10-B which attempts to__ |›;| read the SpartaDOS CL parameter under its own environment.______________ |›;| ________________________________________________________________________ |›;| ________________________________________________________________________ |›;| ________________________________________________________________________ |›;| |›;+--------------------------------------------------------------------------+››;START COMPLILING FOR $20FF, THAT SHOULD GIVE THE GET_PARM ROUTINE AT›;$2000 PLENTY OF ROOM.›SET 14=$20FF›SET $491=$20FF›››INCLUDE "D8:\ACT_UTIL\SYS.ACT"›››MODULE ; global vars›› BYTE Key_Code=764›››PROC Dow_Bell() ; relocatable code block to ring a "bell"›[$A9$00$8D$08$D2$A9$30$8D$00$D2$A0› $B0$A2$FF$8E$0A$D4$CA$D0$FA$88$8C› $01$D2$C0$A0$D0$F0$60]›››PROC Duck_Bell()› BYTE Loop, Delay› FOR Loop=0 TO 254› DO› Sound(0,Loop,10,12)› FOR Delay=1 TO 12 DO OD› OD› SndRst()›RETURN›››PROC Detect_Keypress()› Key_Code=255 ;reset key buff› Dow_Bell()› WHILE Key_Code=255 DO OD› Key_Code=255› Duck_Bell()›RETURN›››PROC Go_DOS() ; no "RETURN" is needed since we just go to DOS from here ›[$6C$0A$00]›››PROC Get_Parm=$2000(CARD PRMADR) ; dummy proc, no "RETURN" needed›››PROC DirW()›› CHAR ARRAY Parm(64), ; this will hold the parameter› Dir_Ln(41), ; used for reading dir› Fld_Data(21)›› BYTE lm=82, rm=83, sw, ln=[1],› col=[1], ec, i=[0], max_fld_cols››› lm=0 sw=rm+1 max_fld_cols=sw/20› Get_Parm(Parm) ; call the Get_Parm routine and pass it the addr of› ; the Parm var.› Close(1) Open(1,Parm,198,0) ; aux1=6+64+128 (dir+attrib scan+extended)› PutE()› PrintE("      Äéò× ö®±®±±Á      ")› PrintE("Æòåå×áòå âù Êïî Ä® Íåìâï")› ln=4› DO› IF EOF(1)=136 THEN EXIT FI ; end of file so quit processing dir› i==+1› IF i>4 ; yes, we have gotten past the dir header lines› THEN› FOR col=1 TO max_fld_cols› DO› InputSD(1,Dir_Ln)› SCopyS(Fld_Data,Dir_Ln,1,20)› FOR ec=1 TO 19› DO› IF Fld_Data(ec)=32 THEN Fld_Data(ec)= '. FI› OD› Fld_Data(20) = '|› Print(Fld_Data)› IF EOF(1)=136 THEN EXIT FI› OD› ln==+1› IF ln=24 AND EOF(1)<>136 THEN› Print("Íïòå ­")› Detect_Keypress()› PutE()› ln=1› FI› ELSE ; no! we're still on the dir header› InputSD(1,Dir_Ln)› PrintE(Dir_Ln)› ln==+1› FI› OD› Close(1)› PutE()› Go_DOS()›RETURN››