home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.os2.programmer
- Path: sparky!uunet!well!shiva
- From: shiva@well.sf.ca.us (Kenneth Porter)
- Subject: relation between allowed AVIO sizes and attribute sizes
- Message-ID: <Bs9r3w.MIK@well.sf.ca.us>
- Keywords: AVIO attribute
- Sender: news@well.sf.ca.us
- Organization: Kensington Labs Inc.
- Distribution: comp
- Date: Fri, 31 Jul 1992 19:50:20 GMT
- Lines: 24
-
- (1.3 code)
-
- I want to create an AVIO presentation space with a *lot* of lines of
- scrollback. The documentation specifies that the total AVIO buffer must
- fit in 64k. This led me to believe that by specifying only one
- attribute byte for each character cell, I could have 32k cells. As
- illustrated in the following code, this appears not to be the case. I
- can only get 16k cells, which suggests that VioCreatePS uses the same
- limits as when creating a 3-byte attribute space.
-
- ================================================================
- // Code that works:
- #define AVIOBUF 16384U
- #define VIDEOWIDTH 40U
- // FORMAT_CGA defined as 1 in PMAVIO.H
- #define NUMLINES ((AVIOBUF/(1+FORMAT_CGA)) / VIDEOWIDTH)
- error = VioCreatePS(&hvps,NUMLINES,VIDEOWIDTH,0,FORMAT_CGA,0);
- // error is 0.
- ================================================================
- // Code that fails
- #define AVIOBUF 32768U
- ... (the rest is the same as above)
- // error is 421 (ERROR_VIO_INVALID_PARMS)
- ================================================================
-