KI> How can I write to file from my TSR interrupt handler (Int 08, 09)?
KI> Can anybody explain me this procedure? Thanx.
I have a Tsr I wrote to dump the screen to a file. I just used the
usual Dos function 40h. However, when a Tsr is invoked the process i.d.
remains that of whatever application was already running; so use of
Dos file-handling functions can create problems with the file-handle
array. To get around this, before calling int 21h you can do the
following:
;get process i.d. of application, and save
;
get_id:
mov ah,51h
int 21h
mov pi_save,bx
;set process i.d. = psp of Tsr
;
mov ah,50h
mov bx,cs
int 21h
Before exiting the Tsr you will need to restore the process i.d. to
its original value.
--Hugh--
--- Maximus/2 3.01
---------------
* Origin: Madman BBS * Chico, California * 916-893-8079 * (1:119/88)
|