| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- ; Вариант 19
- ; Еникеев И.Р. 2084/1
- .286
- .model tiny
- .data
- org 100h
- start:
- mov dx, offset path
- mov di, offset pass
- mov cx, 10
- mov al, ' '
- repnz scasb
- jnz $+3
- inc cx
- sub cx, 10
- neg cx
- call bps
- bps:
- pop bp
- sub bp, offset bps
- ;---------------------
- push ds
- push dx
- ; Test, if currently opening file is in database
- mov di, dx
- call SeekZ
- push di
- std
- mov al, '\'
- repnz scasb
- cld
- jnz $+3
- inc di
- inc di
- pop cx
- sub cx, di
- push cx
- push di
- mov dx, 12
- push cs
- pop es
- lea di, [bp+files]
- searchloop:
- pop si
- pop cx
- push cx
- push si
- push di
- mov al, es:[di]
- jz not_found
- repz cmpsb
- jz found
- pop di
- add di, dx
- jmp searchloop
- found:
- pop di
- pop si
- pop cx
- jmp outta
- not_found:
-
- outta:
- mov ah, 4ch
- int 21h
- SeekZ proc near
- mov al, 0
- mov cx, 0ffffh
- repnz scasb
- neg cx
- dec cx
- dec di
- ret
- endp
- path db 0
- files db 0
- pass db '1234567890 '
- end start
|