msugiyam@muddcs.UUCP (Marc Sugiyama) (01/26/86)
Someone posted an article asking how to change from monochrome to color screens on an IBM PC. I wasn't able to respond via mail, but over the last few months a number of people have asked this question. If you haven't tossed your BASIC manual, the information you need is there, toward the back, in one of the appendices. I can't seem to find it in the BASIC 3.0 manual, but it is in the version 2.0 manual. In any event, the only real trick is that you have to change the "equipment" flags, to make bios change the screen. Really, the machine only thinks that it has one display. If you want to change from one screen to the other, you simply change the monochrome or color monitor adapter flags. You will have to store the cursor position if you don't want to have to clear the screen. BIOS only keeps a single copy of the cursor position, you'll have to keep one for each screen. In any event, attached are two programs which make this clearer. Both are assembly .com files. The first (COLOR) changes to the color screen and the second (MONO) changes to the monochrome screen. Both clear the screen when performing the switch so I don't have to keep track of the cursor position. Hope this helps. ; COLOR ; ; Initialize color/graphics screen ; if1 data segment at 40h rs232_base dw 4 dup (?) printer_base dw 4 dup (?) equip_flag dw ? data ends endif ; code segment org 100h assume ds:data,cs:code program proc near push ds mov ax,data mov ds,ax and equip_flag,0cfh or equip_flag,10h mov ax,0500h int 10h mov ax,0001h int 10h mov ah,01h mov cx,0607h int 10h pop ds ret program endp code ends end program ; MONO ; ; Initialize monochrome screen ; if1 data segment at 40h rs232_base dw 4 dup (?) printer_base dw 4 dup (?) equip_flag dw ? data ends endif ; code segment assume ds:data,cs:code org 100h program proc near push ds mov ax,data mov ds,ax or equip_flag,30h mov ax,0500h int 10h mov ax,0003h int 10h mov ah,01h mov cx,0c0dh int 10h pop ds ret program endp code ends end program Marc Sugiyama bitnet: msugiyam@fourcc.bitnet apra: sugiyama@ucbmiro.arpa or sugiyama@ingres.apra uucp: ucbvax!trwrb!scgvaxd!muddcs!msugiyam USnail: Platt Campus Center Harvey Mudd College Claremont, CA, 91711