Classic Computer Magazine Archive PROGRAM LISTING: 89-10a/QDIR.M65


��%X;SAVE#D:QDIR.M65
X;ASM,#-,#D:QDIR.OBJX;ASM,#-,#D:QDIR.COMX;(
�OBJECT2
�COM<�CODE�OBJECTFX;PX; Set CODE equal to OBJECTZX; to create an object filedX; to be used from a BASICnX; USR routine.xX; Set CODE equal to COM to�X; make a stand alone .COM�X; file for use with Sparta�X; or any other DOS.�X;�X;� X; Quick Directory by Mat*Rat�X; Ratware Softworks� X; (c) 1989, Antic Publishing�X;�X; A quick and dirty utility�X; for getting a complete� X; directory listing while in�X; Atari BASIC.#X; The BASIC program QDIRMAK.BASX; will create a the file:X; D1:QDIR."X;,X; From BASIC immediate mode6X; use the command:@X;JX; E."D:QDIRTX;^#X; The user will be prompted forh X; a directory specification,r"X; and a DIR will be displayed.|X; If it's a SpartaDOS disk,�"X; the directory will be listed�X; in LONG format.�X;��XCORDU��YCORDT�
�SAVMSCX��STRING�;;String ptr��FILEBUF;;Cas buffer��CIOV�;;CALL OS HERE��ICCOMB;;COMMAND TO CIO��ICBADRD;;BUFFER OR FNAME��ICBLENH;;BUFFER LENGTH��ICAUX1J;;AUX BYTE #1�ICAUX2K;;AUX BYTE #2X;�COPN;;COMMAND OPEN&�CCLOSE;;COMMAND CLOSE0�CGTXR;;GET TEXT REC:�CPTXR	;;PUT TEXT RECD�CGBINR;;GET BINARY RECN�CPBINR;;PUT BINARY RECX�CDRAW;;COMMAND DRAWTOb�CFILL;;COMMAND FILLlX;v�OPIN;;OPEN FOR INPUT��OPOUT;;OPEN FOR OUTPUT��OPDIR;;OPEN FOR DIR�X;�%X; A=USR(ADR(QDIR$),ADR("D1:*.*"))�X;�(X; QDIR$ holds the code that follows.�!X; It pulls the address of the�$X; directory specification string�'X; off the stack. It allows the user�$X; to enter a file specification,�%X; such as D2:*.BAS, which is then�#X; used for a directory listing.�X;4F�CODE�OBJECT 	�BEGIN*74F�GETDRV>X; Clean up unecessaryHX; parameters and continueR>\	�CLEANf7p7z0�
H�CLEAN��
�GETDRV�X; Show only a question mark�X; as a prompt for file spec�#X; No room for more in the code.�$>�Q>�CPBINR�
P�ICCOM�&�ICBLEN�&�ICBLEN�Q>
?� �CIOX; Accept the user's fileX; specification.Q>�CGTXR$
P�ICCOM.Q>5�FILEBUF8P�ICBADRB&�ICBADRLQ>(VP�ICBLEN` �CIOjX; FILEBUF now containstX; the text file spec~X; to use as a template�X; for the directory�X; listing.�
�GOTDRV�$>P�Q>�CCLOSE�P�ICCOM9� �CIO�
Q>�COPN�P�ICCOM9�Q>5�FILEBUF�P�ICBADR9�Q>P�ICBADR9
Q>�OPDIRP�ICAUX19Q>�(P�ICAUX292 �CIO<
G�CLOSEDRVF
�GETFILP$>PZQ>dP�ICBADR9nP�ICBLEN9xQ>5�FILEBUF�P�ICBADR9�Q>(�P�ICBLEN9�Q>�CGTXR�P�ICCOM9� �CIO�
G�CLOSEDRV�$>�Q>5�FILEBUF�P�ICBADR�&�ICBADR�Q>(�P�ICBLENQ>�CPTXR
P�ICCOM �CIO"I�GETFIL,�CLOSEDRV6$>P@Q>�CCLOSEJP�ICCOM9T!�CIO^�CODE�COMh�r	�GETDRV|

Back to previous page