Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!necntc!dandelion!ulowell!bu-tyng!draper From: draper@bu-tyng.bu.edu (Dave Draper) Newsgroups: comp.sys.ibm.pc Subject: Screen Border Color using EGA card ?????? Message-ID: <1697@bu-tyng.bu.edu> Date: 29 Aug 88 18:16:12 GMT Reply-To: draper@bu-tyng.UUCP (dday) Organization: Boston University Corporate Education Center, Tyngsboro, MA Lines: 74 I am having problems setting the screen border color on my pc clone. I am using a Paradise Autoswitch EGA 480 display adapter. I used the following debug script. ------------- a 100 mov al,01 ; second number controls the color mov dx,03d9 out dx,al nop r cx 31 n border.com w q ------------- The code only works if the card is in CGA mode. It DOES NOT work in EGA mode. I then tried the following C code. -------------- #include "dos.h" #define SETPAL 0x0b /*"set color palette" service*/ #define VIDEO 0x10 /*video BIOS interrupt number*/ main (argc,argv) int argc; char *argv[]; { union REGS regs; int pal; if (argc != 2) { printf("Usage error."); exit (); } pal = atoi(argv[1]); regs.h.bh = 0; /*set BH =0*/ regs.h.bl = pal; /*color of background - from user*/ regs.h.al = SETPAL; /*service # in AH register*/ int86(VIDEO, ®s, ®s); /*call video interrupt*/ } -------------- This code worked if the card was in either EGA/CGA graphics mode and if the card was in CGA text mode however it did not work in EGA text mode. Does anybody know how to set the border color in EGA text modes? Any help/suggestions would be greatly appreciated. Thanks ahead of time. Dave Draper Reality is for people who can't deal with soc.singles! Don't DUKE it out in '88 ... Lick BUSH !!! Dave Draper UUCP: decvax!elrond!bu-tyng!draper Boston University Corporate Education Center 72 Tyng Road Tyngsboro MA 01879 649-9731 x14