Microsoft KB Archive/37954

= Cannot Set Border Color with ANSI.SYS =

Article ID: 37954

Article Last Modified on 5/12/2003

-

APPLIES TO


 * Microsoft MS-DOS 2.11 Standard Edition
 * Microsoft MS-DOS 3.1
 * Microsoft MS-DOS 3.2 Standard Edition
 * Microsoft MS-DOS 3.21 Standard Edition
 * Microsoft MS-DOS 3.3 Standard Edition
 * Microsoft MS-DOS 3.3a
 * Microsoft MS-DOS 4.0 Standard Edition
 * Microsoft MS-DOS 4.01 Standard Edition
 * Microsoft MS-DOS 5.0 Standard Edition
 * Microsoft MS-DOS 5.0a
 * Microsoft MS-DOS 6.0 Standard Edition
 * Microsoft MS-DOS 6.2 Standard Edition
 * Microsoft MS-DOS 6.21 Standard Edition
 * Microsoft MS-DOS 6.22 Standard Edition

-



This article was previously published under Q37954



SUMMARY
Although the ANSI.SYS device driver allows changing of foreground, background, and text attributes, it does not change the border color. However, there is a ROM BIOS interrupt call that allows the border color to be changed if your ROM BIOS supports it.



MORE INFORMATION
The ROM BIOS interrupt 10H contains the ROM BIOS video services. Subservices 0BH or 10H should be used, depending on the graphics adapter installed. The following is a partial assembly-language code example of how to set the border color using these ROM BIOS video subservices: ; For CGA: ;   mov  ah,0BH  ; video subservice 0BH: set palette mov bh,00H  ; palette subservice 0: set border mov bl,06H  ; color = 6 int 10H     ; call ROM BIOS video interrupt 10H ; For PCjr, EGA, VGA, and MCGA: ;   mov  ah,10H  ; video subservice 10H: set palette mov al,01H  ; palette subservice 1: set border mov bh,06H  ; color = 6 int 10H     ; call ROM BIOS video interrupt 10H

