home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / os2 / programm / 3937 < prev    next >
Encoding:
Text File  |  1992-07-31  |  1.4 KB  |  37 lines

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