home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
magazine
/
progjour
/
1991
/
02
/
vtree
/
disndata.lst
next >
Wrap
File List
|
1991-01-06
|
3KB
|
192 lines
PAGE 60,132
.286c
;----------------------------------------------
S00000 SEGMENT Byte Public 'code0000'
ASSUME CS:S00000
ASSUME SS:S00000
H00000 DB 92 DUP(?)
H0005C DB 57 DUP(?)
H00095 DB 107 DUP(?)
;-------- PROGRAM'S PRIMARY ENTRY POINT -------
P00100 PROC Far
ASSUME ES:S00000
ASSUME DS:S00000
H00100: JMP Short H00161
DB 90h
H00103 DB 0
DB ":\*.*"
DB 0
DB "(C) Copyright Charles Petzold,"
DB " 1985"
H0012D DB "Invalid disk drive$"
H00140 DB "Requires DOS 2.0 +$"
H00153 DB 0
H00154 DW 0
DB "\*.*"
DB 0
H0015B DW 0106h
H0015D DW 033Ch
H0015F DW 0
H00161: CMP AL,0FFh
JNE H0016F
LEA DX,H0012D
H00169: MOV AH,9
INT 21h ;Display($-term)string<-DS:DX
INT 20h ;Program Terminate
H0016F: MOV AH,30h
INT 21h ;Get DOS Vers.# (Vers. "AL.AH")
CMP AL,2
JNC H0017D
LEA DX,H00140
JMP H00169
H0017D: MOV AL,H0005C
OR AL,AL
JNE H0018A
MOV AH,19h
INT 21h ;Return Default Drive in AL(0=A:,1=B:...)
INC AL
H0018A: MOV DL,AL
ADD AL,40h
MOV H00103,AL
CLD
H00192: MOV DX,H0015D
MOV AH,1Ah
INT 21h ;Set Disk Transfer Addr. to DS:DX
MOV BX,H00154
ADD BX,BX
CMP H00153,0
JNE H001B9
MOV Word Ptr [BX+02FCh],0000h
MOV DX,0103h
MOV CX,0010h
MOV AH,4Eh
INT 21h ;Find 1st Match in Dir.(DS:DX->file,CX=Attr.)
JMP Short H001BD
H001B9: MOV AH,4Fh
INT 21h ;Find Next Match in Dir.(uses DTA)
H001BD: JNC H001C2
JMP H002A0
H001C2: MOV SI,H0015D
CMP Byte Ptr [SI+15h],10h
JNE H001B9
ADD SI,1Eh
CMP Byte Ptr [SI],2Eh
JE H001B9
INC Word Ptr [BX+02FCh]
MOV CX,H00154
JCXZ H00218
CMP Word Ptr [BX+02FCh],1
JE H00206
SUB BX,BX
H001E7: MOV AL,0B3h
TEST Word Ptr [BX+02FCh],8000h
JE H001F3
MOV AL,20h
H001F3: CALL P002F3
PUSH CX
MOV CX,0010h
H001FA: MOV AL,20h
CALL P002F3
LOOP H001FA
POP CX
INC BX
INC BX
LOOP H001E7
H00206: CMP Word Ptr [BX+02FCh],1
JNE H00218
MOV CX,H0015F
H00211: MOV AL,0C4h
CALL P002F3
LOOP H00211
H00218: PUSH SI
MOV SI,H0015D
MOV DI,0080h
MOV DX,DI
MOV CX,002Bh
REPZ MOVSB
POP SI
MOV AH,1Ah
INT 21h ;Set Disk Transfer Addr. to DS:DX
H0022C: MOV AH,4Fh
INT 21h ;Find Next Match in Dir.(uses DTA)
JC H00246
CMP H00095,10h
JNE H0022C
MOV AL,0C2h
CMP Word Ptr [BX+02FCh],1
JE H00257
MOV AL,0C3h
JMP Short H00257
H00246: MOV AL,0C4h
CMP Word Ptr [BX+02FCh],1
JE H00257
MOV AL,0C0h
OR Word Ptr [BX+02FCh],8000h
H00257: CALL P002F3
MOV AL,0C4h
CALL P002F3
MOV AL,20h
CALL P002F3
MOV CX,000Dh
MOV DI,H0015B
H0026B: LODSB
OR AL,AL
JE H00276
STOSB
CALL P002F3
LOOP H0026B
H00276: MOV AL,20h
CALL P002F3
MOV H0015F,CX
MOV H0015B,DI
INC Word Ptr H0015B
MOV SI,0156h
MOV CX,0005h
REPZ MOVSB
INC Word Ptr H00154
MOV H00153,0
ADD H0015D,2Bh
JMP H00192
H002A0: CMP H00154,0
JE H002F1
TEST Word Ptr [BX+02FCh],7FFFh
JNE H002B9
MOV AL,0Dh
CALL P002F3
MOV AL,0Ah
CALL P002F3
H002B9: MOV DI,0103h
MOV CX,0046h
MOV AL,0
REPNZ SCASB
DEC DI
MOV CX,0040h
MOV AL,5Ch
STD
REPNZ SCASB
REPNZ SCASB
INC DI
MOV H0015B,DI
INC Word Ptr H0015B
MOV SI,0156h
MOV CX,0005h
CLD
REPZ MOVSB
DEC H00154
MOV H00153,1
SUB H0015D,2Bh
JMP H00192
H002F1: INT 20h ;Program Terminate
P00100 ENDP
;----------------------------------------------
P002F3 PROC Near
H002F3: PUSH DX
MOV DL,AL
MOV AH,2
INT 21h ;Display Character in DL
POP DX
RETN
P002F3 ENDP
S00000 ENDS
END P00100