home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
magazine
/
pctchnqs
/
1990
/
number5
/
flush.asm
< prev
next >
Wrap
Assembly Source File
|
1990-09-21
|
922b
|
31 lines
; int flush(int handle);
;
.model small
.code
public _flush
_flush proc
push bp
mov bp,sp
push bx
mov bx,[bp + 4] ; get file handle
mov ax,4500h ; DOS Dup Handle function
int 21h ; call DOS - returns with
; new handle in ax
jc flush_out ; jump if error
mov bx,ax ; move new handle to bx
mov ax,3e00h ; DOS Close function
int 21h ; call DOS
jc flush_out ; jump if error
mov ax,0 ; clear ax
jmp short flush_out ; exit
flush_out:
pop bx
pop bp
ret
_flush endp
end