home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / os / msdos / programm / 9148 < prev    next >
Encoding:
Text File  |  1992-09-08  |  1.3 KB  |  45 lines

  1. Newsgroups: comp.os.msdos.programmer
  2. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!jvnc.net!nuscc!nusunix3.nus.sg!isc30108
  3. From: isc30108@nusunix3.nus.sg (AMBAT SASI S/O PALISSERY P)
  4. Subject: Re: Color pixel in VGA mode
  5. Message-ID: <1992Sep8.012552.7745@nuscc.nus.sg>
  6. Sender: usenet@nuscc.nus.sg
  7. Organization: National University of Singapore
  8. References: <1992Sep7.110014.21681@jyu.fi>
  9. Date: Tue, 8 Sep 1992 01:25:52 GMT
  10. Lines: 33
  11.  
  12. mpni@jyu.fi (Nieminen Mika Petteri) writes:
  13. : Hi!
  14. : I have a problem with programming in VGA 640X480 16 colors mode.
  15. : I don't know exactly how to change 'color palette' to produce multicolor
  16. : picture. In 320X200 256 color mode it's not a problem (no need to worry
  17. : about different palette/bitplane). 
  18. : Could someome kindly post a simply answer with/without example program (C/Asm)
  19. : how to draw color pixels in 640X480 mode.
  20. :                 Thanks
  21. :                 Mika Nieminen
  22. :
  23. programming in this mode has a lot to do with port[$3CE]
  24. in pseudo assembly (in pre OUT DX,AX form) .....
  25.  
  26. after u init the mode,
  27.    al <- 1    index to enable set/reset of color bit plane
  28.    ah <- f    select all planes
  29.  
  30. when setting pixel,
  31.    al <- 8    bitmask for the byte u r writing to
  32.    ah <- x    eg. x=01010101 at [$a000:0] will write to
  33.            (1,0) , (3,0) , (5,0) & (7,0)
  34.  
  35.    al <- 0    set/reset color bit plane
  36.    ah <- color
  37.  
  38. but works just as well.
  39.  
  40. sasi.
  41.