home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frostbyte's 1980s DOS Shareware Collection
/
floppyshareware.zip
/
floppyshareware
/
USCX
/
DOSUT-09.ZIP
/
COVER.ASM
< prev
next >
Wrap
Assembly Source File
|
1984-11-01
|
2KB
|
96 lines
TITLE COVER - Diskette Contents List - Main Module
SUBTTL Version 1.1 - July 1984
PAGE 81,132
;
; ****************************************************************
; * D. W. Daetwyler - Route 5, Box 518A - Springdale, AR 72764 *
; ****************************************************************
;
CODE SEGMENT PARA PUBLIC 'CODE'
ASSUME CS:CODE,DS:CODE
;
EXTRN DOPRT:NEAR
;
ORG 100H
BEGIN: JMP START
;
PUBLIC VERS,RESTR
;
SETPRT DB 27,'0',27,'C',44,15,0,0,0,0,0,0 ;Set 1/8" 132 character
RESPRT DB 27,64,0,0,0,0,0,0,0,0,0,0 ;Restore to power up status
RESTR DB 12,0,0,0,0,0 ;Do a form feed
VERS DB 0 ;DOS Version flag
DDRV DB 0 ;Default drive at entry
NDRV DB 0 ;Number of drives in system
LOGO DB 'D',0FDH,' Cover$'
PRMT DB 13,10,'Enter drive to list (Esc to quit): $'
ERMSG1 DB 13,10,'Invalid drive$'
;
EXTRN GETTTL:NEAR,GETFRE:NEAR,SCAN:NEAR
EXTRN SORT:NEAR,PRINT:NEAR
EXTRN PSX:BYTE
;
START PROC NEAR
MOV DX,OFFSET LOGO
MOV AH,9
INT 21H
MOV DX,OFFSET SETPRT
CALL DOPRT ;Set printer
MOV AH,30H
INT 21H ;Check DOS Version
OR AL,AL
JZ NOTTWO ;V1.x
NOTTWO: MOV VERS,AL ;Save DOS flag
MOV AH,19H
INT 21H ;Get default drive
MOV DDRV,AL ; and save
MOV DL,AL
MOV AH,0EH
INT 21H ;Get number of drives
MOV NDRV,AL ; and save
;
; Start of main loop
;
MLOOP: MOV DX,OFFSET PRMT ;Prompt for drive
MOV AH,9
INT 21H
MOV AH,1
INT 21H ;Get user response
CMP AL,1BH ;Check for exit
JE QUIT ;He's done, so get off
OR AL,' ' ;Force lower case
SUB AL,'a'-1 ;Compute drive number
JNC DRVOK ;May be valid drive
ERR1: MOV DX,OFFSET ERMSG1 ;Invalid drive message
MOV AH,9
INT 21H ;Error message out
JMP MLOOP
DRVOK: CMP AL,NDRV ;Check for installed drive
JA ERR1 ;Drive not installed
DEC AL
MOV DL,AL
MOV AH,0EH
INT 21H ;Make selected drive default
CALL GETTTL ;Get title
CALL GETFRE ;Get free space
CALL SCAN ;Load directory entries
CALL SORT ;Sequence directory entries
CALL PRINT ;Produce listing
JMP MLOOP
;
QUIT: MOV DL,DDRV ;Load entry default drive
MOV AH,0EH
INT 21H ;Restore default
TEST PSX,1
JZ NOREST
MOV DX,OFFSET RESTR
CALL DOPRT ;Restore page
NOREST: MOV DX,OFFSET RESPRT
CALL DOPRT ;Reset printer
INT 20H ; and exit
START ENDP
;
CODE ENDS
;
END BEGIN