Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!ucsd!sdcsvax!ucsdhub!hp-sdd!ncr-sd!ncrlnk!ncrwic!encad!enprt!gharring From: gharring@enprt.Wichita.NCR.COM (Gary Harrington) Newsgroups: comp.sys.ibm.pc Subject: Re: HELP! Screen memory organisation. Summary: CGA Graphics memory Keywords: CGA Graphics Message-ID: <494@enprt.Wichita.NCR.COM> Date: 28 Jun 89 21:00:58 GMT References: <278@galadriel.UUCP> Reply-To: gharring@enprt.UUCP (Gary Harrington) Organization: NCR Corporation, Wichita KS Lines: 44 In article <278@galadriel.UUCP> stevep@galadriel.UUCP (Steve Paine) writes: >I need help with the PC's screen memory...must use standard graphics... A very quick view of CGA graphics memory: ---------------------------------------------------------------------------- | | CGA Graphics, 320 x 200 pixels, 4 colors, memory organization: | ================================================= | | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | | ================================================= | \ / \ / | \ / \ / | pixel 0,0 pixel 3,0 | | address 0B8000H - 0B9F3FH: even scan lines (0,2,4,...198) | address 0BA000H - 0BBF3FH: odd scan lines (1,3,5,...199) | |Of each bit pair, the most significant bit controls the red gun, the other |controls the green gun. | |This gives: | | Palette 0 Palette 1 | --------------- --------------- | MSB LSB Color MSB LSB Color | --- --- ----- --- --- ----- | 0 1 Green 0 1 Cyan | 1 0 Red 1 0 Magenta | 1 1 Brown 1 1 White | +--------------------------------------------------------------------------- | | CGA Graphics, 640 x 200 pixels, black & white, memory organization: | ================================================= | | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | | ================================================= | | | | | | | pixel 0,0 pixel 7,0 | | addresses are the same as for 320 x 200 above. | ---------------------------------------------------------------------------