home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
progm
/
gvb-int.zip
/
GVB-INT.DOC
< prev
next >
Wrap
Text File
|
1988-06-14
|
4KB
|
88 lines
GVB-INT.SHR - Get Video Buffer Interrupt Handler - 1988 by Simon Kane
This DESQview 'Shared Program' provides a means to allow a program
that writes directly to the screen to use the DV-supplied alternate
video buffer without making major changes or requiring a loader.
Most programs that write directly to the screen determine which video
buffer (CGA or Mono) to use by issuing an INT 10 w/ AH=0Fh and then
saving either B800h (CGA) or B000h (Mono) somewhere. Typically, an
instruction such as 'MOV reg,B800h' (for CGA) will be found (the
register won't always be AX). Once these instructions (Usually at
least two - one for each of CGA and Mono) have been found by using
DEBUG or a similar tool, installation is easy. Some programs might
use a 'MOV mem,B800h' instruction (op code C7h) instead of moving
the segment value to a register. It's possible that the program
could be doing something so strange that this program won't work
(like moving just the high order byte of the segment while depending
on the value in the other byte of the register - which is very bad
programming practice!). If so, I'd like to hear about it. I can be
contacted via the DESQview support bulletin board. There is a slim
chance that the instruction to be replaced is shorter than 3 bytes,
if so, a register had to be set to point to a constant of B800h or
B000h. If you're lucky (and know some assembler!), you can probably
move some instructions around and still make this work. If you find
a program that requires this level of hacking, and you do it, others
would probably appreciate the details - please put them on the
DESQview support bulletin board - after all that's where this came
from in the first place (even if you found it somewhere else!).
Installation procedure:
1. Use DEBUG (or the like) to replace the instructions found above
with the appropriate INT and operand code - NOP any unused bytes!
2. Use 'Change a Program' Advanced Options to invoke GVB-INT.SHR
as a shared program.
The operand code (that follows the INT 67) is constructed as follows:
Bit 76543210
11000rrr Output to General Register rrr: 0=AX, 1=CX, 2=DX,
3=BX, 5=BP, 6=SI, 7=DI (4 is invalid - it would be
SP, but we can't use that and expect to return)
110010ss Output to Segment Register ss: 0=ES, 3=DS (1 and 2
are invalid - they would be CS & SS, but see above)
10...... Output to memory operand with 16-bit displacement
01...... Output to memory operand with 8-bit displacement
00...... Output to memory operand with no displacement
(memory operands are not yet implemented - and may never be!)
Example:
The application program has been found to contain the following:
MOV AH,0Fh
INT 10h
CMP AL,2
JE MONO
CMP AL,7
JE MONO
MOV AX,B800h
JMP GO_ON
MONO: MOV AX,B000h
GO_ON: ....
The interrupt number to be used is 67h
Replace the 'MOV AX,B800h' (xB800B8) with INT 67; NOP (xCD67C0)
Replace the 'MOV AX,B000h' (xB800B0) with INT 67; NOP (xCD67C0)
Enter the name of this program in the Shared Program path field
Go for it!
Note:
If INT 67h is already in use on your system, simply change the line
labeled USER_INT to reflect the desired interrupt number, reassemble
& link GVB-INT, and put that number into the INT instruction instead.
A final word of warning!
The modified application program will no longer run without DESQview!
I recommend that you keep 2 copies of the program under different
names - the original and the DESQview-only version. Any name will do
for the DV version - just enter that name into the PIF or BAT file
that invokes it. If you use a BAT file, either keep two of them, or
add a parameter to tell it which version to use.