 |
-
- :
- . .
.
.286
.model tiny
.code
My_string db 'c:\123.txt$' ;
My_string1 dw 40 dup(?) ; ப
Handle dw 0 ; yandl
Adres dw 0 ; ப
ORG 100h
start:
jmp setup ; ३ ண 樨
; ணବ -----------------------------------------------------------------------------
int9_handler PROC FAR
cmp ah,9 ;ਬ: 09h?
je Ok_09 ; , Ok_09
jmp qwe5 ; ᯮ㥬
Ok_09:
pushf ; ॣ
pusha
; c ப My_string1
push ds
push cs ; ப DS:DX
pop ds
mov cx,40 ; 稪
mov si,0 ;
lea BX, My_string1 ; Bx
mov Adres, dx ; ப DX
poperlo: ; 横
mov ax,[adres+si] ; 2 ᨬ ப
MOV WORD PTR [BX], ax ; 2 ᨬ
inc bx ; 騬
inc bx ; 2
inc si
inc si
loop poperlo
pop ds ; DS
; a
mov ax,3d02h ; ⥨
mov dx,offset My_string ;? DX
int 21
mov HANDLE,AX ;୨
mov ax,4200h ; ⥫
mov al,02h ;
xor cx,cx ;㫨 ॣ
xor dx,dx ;
MOV BX,HANDLE
int 21
;
mov ah,40h ; 襬
mov cx,80 ; 80 ᨬ
lea dx, My_string1 ; 쬥 墮
int 21
; ⥨
mov ah,3Eh ; 뢥 a
MOV BX,HANDLE ; aa
int 21
popa
popf
qwe5:
jmp cs:[old_interrupt9] ; ३ a 稪 INT 09h
old_interrupt9 DWORD ?
int9_handler ENDP
end_ISR label BYTE
; ------------- ( १⮩ ண ) --------------------------------------------------
setup:
mov ax,3521h ; । 票 ண INT 09h
int 21h
mov word ptr old_interrupt9,bx ; ୨ ६
mov word ptr old_interrupt9+2,es
mov ax,2521h ; INT 09h
mov dx,offset int9_handler
int 21h
mov ax,3100h ; 訬 ண १
mov dx,OFFSET end_ISR ; 饨 १⮩
mov cl,4
shr dx,cl ; 16, ⮡ 㧭 aaaa
inc dx ; 㣫 䮢
int 21h
END start
- :
- .
DS:DX.
, '$'.
, .. , .
.286
.model tiny
.code
ORG 100h
start:
jmp setup;
;
My_string db 'c:\123.txt',0;
Handle dw ?;handl
new21 PROC FAR
cmp ah,9;: 09h?
je Ok_09; , Ok_09
db 0eah
old21h_o dw ?
old21h_s dw ?
;
Ok_09:
pushf;
pusha
;
push ds
push dx
;
mov si,dx
xor cx,cx
cld
; "$"
CheckString: lodsb
inc cx
cmp al,'$'
jnz CheckString
;
push cx;save string length
push cs
pop ds
; a
mov ax,3d02h;
mov dx,offset My_string; DX
; INT 21h
pushf
call dword ptr cs:[old21h_o]
;
mov HANDLE,AX;
mov bx,ax
mov ax,4202h;
xor cx,cx;
xor dx,dx
; INT 21h
pushf
call dword ptr cs:[old21h_o]
;
mov ah,40h;
mov bx,HANDLE
;
pop cx
pop dx
pop ds
; INT 21h
pushf
call dword ptr cs:[old21h_o]
;
push ds
push cs
pop ds
mov ah,3Eh; a
MOV BX,HANDLE; aa
; INT 21h
pushf
call dword ptr cs:[old21h_o]
;
pop ds
popa
popf
jmp dword ptr cs:[old21h_o]
new21 ENDP
;------------- ( )
setup:
mov ax,3521h; INT 21h
int 21h
mov old21h_o,bx;
mov old21h_s,es
mov ax,2521h; INT 21h
mov dx,offset new21
int 21h
;
mov dx,offset setup
int 27h
END start
|  |