[net.micro.pc] DOS int 021h problems

dap1 (12/17/82)

#N:ihlpb:17100004:  0:1891
ihlpb!dap1    Dec 16 17:37:00 1982

This group has been quiet for a while now so I thought I would ask a few more
questions.

I just finished a routine which sets up a timer interrupt and found out the
following:  The DOS interrupts are not reentrant!  I couldn't figure out why
the DOS interrupts always blew my timer interrupt away until I read the short
sentance in the DOS manual which says "...the DOS interrupts all use an
internal stack".  I assume that in my case, one DOS interrupt is interrupted
by the timer interrupt which proceeds to call another DOS interrupt which
in turn messes up the internal stack so that when the original code is rti'd
to it blows up.  This fits all the cases that I have observed.
	So the question is: is there any good way around this, short of recoding
all the DOS interrupts as reentrant routines?  This would take a fair chunk of
memory and time, neither of which do I particularly care to give up.  Does
this preclude the existence of some sort of reasonable multitasking under DOS?
I have some ideas (i.e., when a routine is interrupted save away the stack)
but none of them are very suitable.
	Another question relates to the random block write (function 0x28) in
DOS.  It appears in the manual as though it will perform blocking and 
deblocking for the user but I found out (via DEBUG) that if you want to write
5 characters starting at offset 5 in the first block DOS will allocate a buffer
and place your five bytes at the proper offset in the buffer and write it out
to the right place.  Only problem is, it doesn't care what else is in the bufferbesides your five bytes.  Everything else is garbage.  Is there a reasonable
way to block and deblock records under DOS?
						Darrell Plank
						BTL-IH
						ihlpb!dap1
P.S. For those of you who are interested, I still don't have any information
on .obj or .lib file formats.  It looks like I may live out my life in
ignorance.