'=========================================================================== ' Subject: OUT COMMAND Date: 08-15-95 (20:34:00) ' Author: Eli Bennett Code: QB, QBasic, PDS ' Keys: OUT,COMMAND Packet: GRAPHICS.ABC '=========================================================================== 'Date: 08-15-95 (20:34) Number: 583 'From: ELI BENNETT Refer#: NONE ' To: MICHELLE QUINN Recvd: NO 'On (11 Aug 95) Michelle Quinn wrote to Olivier Dagenais... ' MQ> DOES ANYONE KNOW HOW to use mode 13 vga Palette commands to get colors ' MQ> OTHER ' MQ> than shades of red. I know how to use the palette command, and how to use ' MQ> QuickBasic, but i cannot for the life of me figure out how to get something ' MQ> other than 0-63 shades of red! ' EEEEEWwww... Never ever use that ugly disgusting palette command... ' use the OUT command.. ' The vga card has three unique ports for what you want ' &h3c7 in basic or in asm 03c7H (READ from color) ' &h3c8 (WRITE to color) ' &h3c9 (RGB to read or set) ' here is how this works...... ' lets say you want to change color 0 or black into the brightest ' blue possible but you want to save the origenal rgb values ' just do this '----------------------cut----------------- DEFINT A-Z SCREEN 13 'get origonal rgb values OUT &H3C7, 0 'read first colors rgb values Ored = INP(&H3C9) 'RED Og = INP(&H3C9) 'GREEN Ob = INP(&H3C9) 'BLUE 'the first time you read or write you are reading or writing to 'the red register, and then the green one and so on then it loops '(if you read again) back to the top or to RED OUT &H3C8, 0 '(write to the first color) OUT &H3C9, 0 OUT &H3C9, 0 OUT &H3C9, 63 'highest blue possible PSET (0, 0), 0 SLEEP 'restore old rgb vals. OUT &H3C8, 0 OUT &H3C9, Ored OUT &H3C9, Og OUT &H3C9, Ob SCREEN 0, 0, 0, 0 END