🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc
Article #15555

interrupts

#15555
From: ma168a
Date: Thu, 05 Feb 1987 04:40
53 lines
3253 bytes
  I was not paying attention at the time the newsgroup contained a discussion
of utilities to direct printer output to a file. I recently found that I needed
such a utility -- and obtained two public domain utilities (VPRINT and LPTX --
the latter was obtained from the info-ibmpc library).  Both crash on my AT-
compatible running DOS 3.2. I noted that LPTX.ASM was written to work with DOS
2.0. When I run it under 2.0 it does work. I also have no problems with two
separate utilities I wrote inspired by VPRINT: the first saves printer output
to memory; the second saves memory to disk.  [While my immediate needs have
been satisfied by these two programs, I'd like to hear from the person who
offered to supply a printer-->disk redirection program provided it works on
DOS 3.2]

  The crash occurs at the point, within the printer interrupt, when a disk
service interrupt is called. LPTX tries to ameliorate the problem by saving
a substantial chunk of DOS during the disk call -- apparently the proper chunk
for DOS 2.0 is not the proper chunk for DOS 3.2.

  The standard references caution against using interrupts from within a
proposed new interrupt. This imposes a severe limitation which some people
have apparently managed to circumvent in special cases. Are there any general
techniques?

  The reason given for the caution is that "DOS is not reentrant".  My under-
standing of this is that certain registers and memory locations are used to
service a call and, therefore, if two calls are made to the same code some
vital data needed for the first call will be displaced by the second. This
prevents a true multi-user environment (in which two tasks are executing the
same code at the same time) and it prevents a task from calling a segment of
code before a previous call using the same code or data has been completed.
Vital data contained in absolute memory rather than being stacked or located
in a user frame would produce this problem. I fail to see how a call to a
printer interrupt and a call to a disk write function could overlap, but
apparently they do.

  My questions are:

(1)  Is my understanding of the problem (as expressed in the previous                paragraph) correct?   {if not, please explain the situation}

(2)  Is there a valid statement of the form:

     "to execute interrupt x  from  within  interrupt y  you must save
     and restore z"

I would be interested in finding that there is a z which works for all x
and y!

                                              John J Wavrik
                                              Math Dept
                                              UCSD

...ucbvax!sdcsvax!sdcc3!ma168a  (uucp)
sdcc3%ma168a@SDCSVAX.UCSD.EDU   (arpa)
Technical Details
Message-ID: <3732@sdcc3.ucsd.EDU>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!mit-eddie!genrad!decvax!ucbvax!sdcsvax!sdcc6!sdcc3!ma168a

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!mit-eddie!genrad!decvax!ucbvax!sdcsvax!sdcc6!sdcc3!ma168a
From: ma168a@sdcc3.UUCP
Newsgroups: comp.sys.ibm.pc
Subject: interrupts
Message-ID: <3732@sdcc3.ucsd.EDU>
Date: Wed, 4-Feb-87 23:40:44 EST
Article-I.D.: sdcc3.3732
Posted: Wed Feb  4 23:40:44 1987
Date-Received: Sat, 7-Feb-87 10:50:53 EST
Organization: University of California, San Diego
Lines: 53
Keywords: DOS interrupts