
XBCAST - Technical Info
-----------------------

When Windows starts up and shuts down, it sends, via interrupts, messages to
applications saying that it has started or quit.  If you have Smartdrv loaded
on your machine, it will listen for these messages, and alter its cache size
accordingly, from it's normal DOS size to its special Windows size.

To do this, it uses interrupt 2FH, the multiplex interrupt, function 16H.
There are 2 subfunctions of interest, which are the two used by XBCAST and
QBCAST to emulate Windows startup/shutdown.

The first of these is subfunction 1605H:

	AX = 1605h
	ES:BX = 0000h:0000h
	DS:SI = 0000h:0000h
	CX = 0000h
	DX = flags
             bit 0 = 0 if Windows enhanced-mode initialization
             bit 0 = 1 if Microsoft 286 DOS extender initialization
             bits 1-15 reserved (undefined)
	DI = version number (major in upper byte, minor in lower)

The Windows enhanced mode loader and Microsoft 286 DOS extender will broadcast
an INT 2F/AX=1605h call when initializing. Any DOS device driver or TSR (IE
Smartdrv) can watch for this broadcast and return the appropriate values.  If
the driver or TSR returns CX <> 0, it is also its responsibility to display an
error message.

Each handler must first chain to the prior INT 2F handler with registers
unchanged before processing the call

The second interrupt is the exit one:

	AX = 1606h
	DX = flags
             bit 0 = 0 if Windows enhanced-mode exit
             bit 0 = 1 if Microsoft 286 DOS extender exit
             bits 1-15 reserved (undefined)

When XBCAST calls these interrupts, it sets bit 0 of DX to be 1, and sets
DI to be 0FFH.  QBCAST doesn't set bit 0 of DX, because I am not 100% sure
that Smartdrv will respond to a DOS extender startup message.

There are also 2 other sub-functions (08H and 09H) which signal the startup
and shutdown completion, but as XBCAST does not use them, I thought it best
if QBCAST followed the original as closely as possible.

Please remember QBCAST is an unsupported program, not offically endorsed by
Clarion Software.

If you have any queries, please contact Paul Attryde at Clarion Tech Support:

Voice: +44 (0)582 763999
Fax:   +44 (0)582 768222
BBS:   +44 (0)582 769666
Mail:  Clare House
       Thompsons Close
       Harpenden
       Hertfordshire
       AL5 4ES
