[comp.sys.ibm.pc] 256 colors on Model 50

tbg@apollo.UUCP (07/09/87)

    Thanks to all those who have been responding with info
    on the 256 color mode on the VGA.  Right after I sent
    my original query I saw and bought the Technical Reference
    for the 50/60 (my dealer had no idea how to get one)
    and it confirmed my hunch that mode 19 (decimal) was
    correct.  

    Unfortunately the information on programming the DAC
    to initialize the pallette (so I can select what 256
    I want to display) is not great.  I tried doing it
    from Turbo-C without any success.  A note in the
    technical reference manual says something about there
    being routines in the BIOS to do this for me...

    ...so, it looks like I need to keep hacking away
    and/or try to find the new BIOS technical reference.


    I tried this routine (reproduced from memory; I don't
    have a printer at home yet) in Turbo-C:

    load_lut(index,red,green,blue)
    char index,red,green,blue;
        {
        disable();      /* disable interrupts */
        
        pokeb(0,0x2ce8,index);  /* write index addr into pel register */
        
        pokeb(0,0x2ce9,red);    /* note: "0x2ce8", and "0x2ce9" are from  */
        pokeb(0,0x2ce9,green);  /* memory and are probably not            */
        pokeb(0,0x2ce9,blue);   /* what I actually tried last night       */                                      

        enable();       /* enable interrupts */
        }

    I am assuming "pokeb" is the right method for accessing
    a register location (I am new to 8086 stuff.  the first
    argument is supposed to be the segment).  Similar attempts
    to read the DAC as instructed in the technical reference 
    returned all ones (-1).  Anyway, I was unable to change any
    LUT locations.  (I am displaying all 256 colors).

/tom