Subj : DV second level
To : All
From : Jcurtis
Date : Thu Jun 26 2025 12:15 pm
DESQview has little or no practical use these days. It's like exploring caves. Why would anyone do that. IDK. At least I'm safe with DESQview. No risk to life or limb.
For programmers, DV has second level interrupts.
> INT 15 - TopView - "GETBIT" - DEFINE A 2ND-LEVEL INTERRUPT HANDLER
> AX = 1013h
> ES:DI -> FAR service routine
> Return: BX = bit mask indicating which bit was allocated
> 0000h if no more bits available
> SeeAlso: AX=1014h,AX=1015h
> Note: only a few TopView/DESQview API calls are allowed during a hardware
> interrupt; if other calls need to be made, the interrupt handler
> must schedule a 2nd-level interrupt with "SETBIT" (AX=1015h)
Ralf Browns's DV interrupt list details the call interface as above, but doesn't tell you how it all works. Davis' DV programming book says nothing about it either. Seems interesting, but interrupt code debugging is no fun chore. Still, I wanted to know how it works.
With prolonged trial and error, I slowly worked it out. I have a UART TSR that does high priority RECV work in the first level hardware interrupt handler, and defers lower priority work to a second level handler.
Interesting facts:
When a second level handler starts, interrupts are already enabled by default, backwards from standard interrupt behavior. Makes sense though, because why would you bother with a second level handler, if not to do lower priority work with interrupts enabled.
That's true when a first level handler does the scheduling. But if a second level handler schedules yet another second level handler, the subsidiary second level handler starts with interrupts disabled by default, just like a standard interrupt handler.
Sounds good to me.
---
� Synchronet � Vertrauen � Home of Synchronet � [vert/cvs/bbs].synchro.net