-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathARCHIVE.INC
73 lines (50 loc) · 1.5 KB
/
ARCHIVE.INC
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
; Archive Unit for file lister <C> 1992 Created by Dàrk Shàde
.DATA?
FPointer dd ? ; File read pointers
.CODE
; Archive handler
; @Input
; si = Handler
TellArchive PROC
LOCAL Handler: WORD = AUTO_SIZE
push bp
mov bp, sp
sub sp, AUTO_SIZE
mov Handler, si
xor eax, eax
mov FPointer, eax
mov TotUsed, eax
mov TotFiles, ax
mov TotDirs, ax
push bx
xor dx, dx
call TellHead
mov ax, 0700h + '\'
stosw
mov si, OFFSET DTA.dtaName
call TellStr
call AdjustDI
pop bx
add di, 160
call CheckMore
TellALoop: mov ax, 4200h
mov cx, WORD PTR [OFFSET FPointer + 2]
mov dx, WORD PTR [OFFSET FPointer]
int 21h ; Set file pointer!
mov ah, 3Fh
xor dx, dx
push di
call Handler
pop di
or al, al
jz DoneArch
push bx
call TellFile
call AdjustDI
call CheckMore
pop bx
jmp TellALoop
DoneArch: mov sp, bp
pop bp
ret
TellArchive ENDP