home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Phoenix CD 2.0
/
Phoenix_CD.cdr
/
11a
/
cover20.zip
/
COTITL.ASM
< prev
next >
Wrap
Assembly Source File
|
1991-01-21
|
2KB
|
80 lines
PAGE ,132
TITLE COTITL - Diskette contents list - Get Title
COMMENT * Version 1.0 - June 1983
(PER Dr. Dobbs Journal, January, 1984, #87)
(Dan Daetwyler "Sorted Diskette Directory for
the IBM PC")
Version 2.0 Bruce F. Cameron
Cincinnati OH
February 25, 1985
Counts hidden files
Grouped sort (i.e. all COM files first etc.)
Includes Volume Label and Directory (if not root)
Lists Subdirectory names
Free space up to 100M (hard disk) *
;
;
PAGE 82
;
CODE SEGMENT PARA PUBLIC 'CODE'
ASSUME CS:CODE, DS:CODE
;
PUBLIC TITLX, FREE, VOLUME
TPRMT DB 13,10,'Enter Title: $'
TBUF DB 40,0 ; Input buffer for user title
DB 40 DUP (?)
TITLX DB 13 DUP (' ') ; Title line
TIL1 DB 42 DUP (' ')
DB 'Free: '
FREE DB 9 DUP (' ') ; Formatted 'free space' in title line
MONTH DB ' /' ; Date fields
DAY DB ' /'
YEAR DB ' ',0 ; End of title
VOLUME DB 11 DUP (' '),0 ; Volume label line
;
PUBLIC GETTTL, DECMAL
GETTTL PROC NEAR
MOV DI,OFFSET TITLX
MOV CX,55
MOV AL,' '
REP STOSB ; Clear title line
MOV DX,OFFSET TPRMT
MOV AH,9
INT 21H ; Prompt for title
MOV DX,OFFSET TBUF
MOV AH,0AH
INT 21H ; Get user title
MOV CL,TBUF+1 ; Load title length
XOR CH,CH
MOV SI,OFFSET TBUF+2
MOV DI,OFFSET TIL1
REP MOVSB ; Move user title to title line
MOV AH,2AH
INT 21H ; Get date
SUB CX,1900 ; Convert to two digit year
MOV DI,OFFSET YEAR
MOV AL,CL
CALL DECMAL ; Fill in year
MOV DI,OFFSET MONTH
MOV AL,DH
CALL DECMAL ; month
MOV DI,OFFSET DAY
MOV AL,DL
CALL DECMAL ; day
RET ; in the title line
GETTTL ENDP
DECMAL PROC NEAR ; Converts AL to two decimal digits
AAM ; and stores at DI
OR AX,'00'
XCHG AL,AH
STOSW ; Save in title image
RET
DECMAL ENDP
;
CODE ENDS
;
END
S