Bits Per Pixel Per Plane for Graphics GET for SCREEN 3 and 4 (50003)



The information in this article applies to:

  • Microsoft QuickBASIC 4.0
  • Microsoft QuickBASIC 4.0b
  • Microsoft QuickBASIC 4.5
  • Microsoft BASIC Compiler for MS-DOS and OS/2 6.0
  • Microsoft BASIC Compiler for MS-DOS and OS/2 6.0b
  • Microsoft Basic Professional Development System for MS-DOS 7.0

This article was previously published under Q50003

SUMMARY

The bits-per-pixel-per-plane values and the number of planes for SCREEN 3 and SCREEN 4 were omitted and must be added under the graphics GET statement in the following sources:

  1. Page 207 of "Microsoft QuickBasic 4.0: Basic Language Reference" manual for Versions 4.00 and 4.00b
  2. Page 207 of "Microsoft Basic Compiler 6.0: Basic Language Reference" manual for Versions 6.00 and 6.00b for MS-DOS
  3. Page 151 of "Microsoft Basic Version 7.00: Basic Language Reference" manual for Version 7.00 for MS-DOS
  4. The QuickBasic Advisor on-line help screen for QuickBasic 4.50 under "HELP: GET (Graphics) Statement Details"
  5. The QuickBasic Extended Advisor on-line help screen for Basic Compiler 7.00 under "HELP: GET (Graphics) Statement Details"
Below is a table that contains the complete values for bits per pixel per plane and the number of planes used by the GET (Graphics) statement.

This information applies to Microsoft QuickBasic Versions 4.00, 4.00b, and 4.50 and to Microsoft Basic Compiler Versions 6.00, and 6.00b for MS-DOS and to Microsoft Basic PDS 7.00 for MS-DOS.

MORE INFORMATION

The following complete table provides values necessary to calculate the array size required by the graphics GET Statement:
                   Bits
                Per Pixel
   Mode         Per Plane     Planes
   ----         ---------     ------
   SCREEN 1     2             1
   SCREEN 2     1             1
   SCREEN 3     1             1   <<-- (Add to manual)
   SCREEN 4     1             1   <<-- (Add to manual)
   SCREEN 7     1             4
   SCREEN 8     1             4
   SCREEN 9     1             2 (if 64K of EGA memory)
                              4 (if more than 64K of EGA memory)
   SCREEN 10    1             2
   SCREEN 11    1             1
   SCREEN 12    1             4
   SCREEN 13    8             1
				
The GET statement transfers a screen image into an array. The PUT statement, associated with GET, transfers the image stored in the array onto the screen.

For the statement
   GET (x1,y1)-(x2,y2),arrayname
				
the following formula gives the required size of the array in bytes:
   4+INT(((x2-x1+1)*(bits-per-pixel-per-plane)+7)/8)*planes*((y2-y1)+1)
				

Modification Type:MinorLast Reviewed:8/16/2005
Keywords:KB50003