Jeste, kdyby to nekoho zajimalo, nastaveni barev na VGAcku. Funkce outp() zapisuje bajt (druhy parametr) na I/O port s adresou udanou v prvnim parametru, tj. jde o obdobu strojove instrukce outb:
#define uchar unsigned char void Write_DAC_C_Palette(uchar StartColor,uchar NumOfColors,uchar *Palette) { outp(0x03C6,0xff); //Mask all registers so we can update any of them outp(0x03C8,StartColor); //1st color to input! for(short i=0; i<NumOfColors*3; i++ ) { outp(0x03C9,Palette[i]<<2); } } void Set_DAC_C(uchar Color,uchar Red, uchar Green, uchar Blue) { outp(0x03C6,0xff); //Mask all registers even though we only need 1 of them outp(0x03C8,Color); //Color to set outp(0x03C9,Red); outp(0x03C9,Green); outp(0x03C9,Blue); }