Article View: comp.os.msdos.programmer
Article #5005Small utility to disable VGA border
From: Milan M Shah
Date: Mon, 04 Mar 1991 01:38
Date: Mon, 04 Mar 1991 01:38
76 lines
4107 bytes
4107 bytes
I got sick of the silly border (overscan) color feature of the VGA. Its
epsecially annoying because I use a 'dos shell' to execute programs, and this
always screws up the border color for a very disturbing look. So, after a lot
of hacking, I have come up with a small (29 bytes when assembled!!) program
that disables the border color altogether (ie, its always black). Of course,
there's a catch. It works *only* on a Paradise VGA 1024 card based on the
PVGA1B or Western Digital WE90C00 chipset. (from what I know, any card that
is a Paradise / paradise clone made after 1986). Here is the assembly source
for it.
;*****************************************************************************
;
;Author : Milan Shah
;Date : 3/3/91
;Program to disable the border color on Paradise 1024 cards based on the
;Western Digital WD90C00 / Paradise PVGA 1B chipset
;
;*****************************************************************************
_TEXT SEGMENT PUBLIC 'CODE'
ASSUME CS:_TEXT,DS:_TEXT
ASSUME ES:_TEXT,SS:_TEXT
ORG 100H
START: jmp main
;*****************************************************************************
;
; The following code was pieced together with information from 'Advanced
; Programmer's Guide to Super VGAs' by George Sutty and Steve Blair, Brady
; Books, Simon and Schuster.
; Relevant information:
; I/O port 3CEh is the index register and I/O port 3CFh is the data
; Relevant information:
; I/O port 3CEh is the index register and I/O port 3CFh is the data
; register for the Graphics Controller. Index 0Fh of this file is to be set
; to 05h to unlock extended registers. In addition, index 29H of the
; CRT Controller (Index at 3D4h, data at 3D5h) must be set to A5 to
; access indexes 2Ah - 30h of the CRT Controller registers. Index 2Eh of
; the CRT controller registers is Misc. Control 1. Bit 0 of Misc. Control
; 1 disables the border.
;
; To address index i of register file located at I/O port XXXh, first write
; out the index at XXXh, then read or write the data at XXX+1h. Can combine
; the two operations for a write by sending out the word dih to XXXh. Thus
; writing 050Fh at port 3CEh selects index 0Fh and writes 05h into the
; register at that index.
MAIN: mov dx,03CEh ;Extended Register Locking register
mov ax,050Fh ;Index 0Fh, data 05h
out dx,ax ;unlock extended registers
mov dx,03D4h ;Port address of Misc. Control1 Reg.
mov ax,0A529h ;Unlock extended reg index 2A-30h
out dx,ax
mov al,2Eh ;Index 2Eh is Misc. Control Reg 1
out dx,al ;Tell PVGA we want to access it
mov al,2Eh ;Index 2Eh is Misc. Control Reg 1
out dx,al ;Tell PVGA we want to access it
mov dx,03D5h ;Get existing data in Misc Control 1
in al,dx
or al,01h ;Disable the Border bit
out dx,al ;Write Misc. Control 1 data
int 20h ;Done
_TEXT ENDS
END START
I assembled it with Tlink /t. Works like a charm on my machine (clone paradise
1024 card purchased about 2 years ago).
If there's any interest, I can put the .com file somewhere.
Milan
.
Technical Details
Message-ID:
<1991Mar4.013815.6378@athena.mit.edu>Path:
arc1-ca.pugleaf.net!utzoo!news-server.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!mmshahShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!news-server.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!mmshah From: mmshah@athena.mit.edu (Milan M Shah) Newsgroups: comp.os.msdos.programmer Subject: Small utility to disable VGA border Message-ID: <1991Mar4.013815.6378@athena.mit.edu> Date: 4 Mar 91 01:38:15 GMT Sender: news@athena.mit.edu (News system) Distribution: usa Organization: Massachusetts Institute of Technology Lines: 76