-
Notifications
You must be signed in to change notification settings - Fork 0
/
_find.asm
61 lines (49 loc) · 1.02 KB
/
_find.asm
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
.286
.model tiny
.code
org 100h
Entry:
mov ah,3bh
lea dx,direct
int 21h
jc Exit
lea bp,DTA
mov dx,bp
mov ah,1ah
int 21h
mov ah,4eh
lea dx,file
mov cx,37h
int 21h
jc Exit
mov al,byte ptr ds:[bp+15h]
rol al,4
jnc FileFound
;-------====== DIRECTORY ======-------
FileFound:
Exit:
int 20h
MyConvert proc
;в SI адрес откуда, в DI куда
push si
mov cx,8
Next:
lodsb
cmp al,'*'
je Zorachka
cmp al,'.'
je ExitLoop
stosb
loop MyConvertNext
ExitLoop:
mov al,'?'
rep stosb
Zorachka:
ret
MyConvert endp
direct db '\',0
file db '*.*',0
fname db '????????.TXT',0
DTA:
end Entry
end.