So 1st my TSR 😀 Dont laugh about the code, its really quick&dirty and I was to lazy to install my MASM and Turbo Debugger 😉
__________________
a
nop
xor ax,ax
push ax
pop ds
mov ax,[40]
mov bx,[42]
push cs
pop ds
mov [251],ax
mov [253],bx
xor ax,ax
push ax
pop ds
mov ax, cs
mov [42],cs
mov ax,200
mov [40],ax
mov ah,31
mov dx,100
int 21
a 200
cmp ah, 0f
je 230
cmp ah,0
jne 250
out 80,al
cmp al,12
jne 250
mov al,50
jmp 250
a 230
mov al,12
mov ah,0
mov bh,0
jmp 250
a 250
jmp aabb:ccdd
retf
n pega.com
rcx
500
w
q
_______________________
Just copy it in a file "PEGA.ASM", run
DEBUG < PEGA.ASM
and it will output PEGA.COM
What does it do? Redirects all call to VIDEO-BIOS INT 10 to itself and stays in memory after exiting. Afterwards it looks if the 640x480 mode 12h is requested. If yes, it directs it to mode 50h as this is the 640x480 mode on my PEGA.
The called mode is also displayed on a Diagnostic Post card (port 80), so you will see the current screen mode there.
I also had to add some lines to get Windows running as it verifies the current mode on startup, will not be neccessary for other programs...
So in this form is it only useful for PEGA owners and to Display mode on the Post card, but can be easily modified to redirect other Video modes too. You can run Commander Keen on a 640x350 screen...but it will be small 😉