Article ID: 58567 - Last Review: November 21, 2006 - Revision: 1.3

Any EGA/VGA Video RAM Above 256K Not Usable in Compiled Basic

System TipThis article applies to a different operating system than the one you are using. Article content that may not be relevant to you is disabled.
This article was previously published under Q58567
Expand all | Collapse all


Any RAM above 256K on an EGA or VGA video card cannot be used to store screen pages during the execution of a compiled Basic program.

This information applies to Microsoft QuickBasic Versions 2.00, 2.01, 3.00, 4.00, 4.00b, and 4.50 for MS-DOS, to Microsoft Basic Compiler Versions 6.00 and 6.00b for MS-DOS, and to Microsoft Basic Professional Development System (PDS) Version 7.00 for MS-DOS.

These compilers are compatible with video cards that conform to the IBM standard. Accessing video RAM above 256K is not part of this standard.


For example, when reading the documentation on the SCREEN statement in either the manuals or online Help included with the above products, it may appear that more than 2 pages of screen memory are available to a 512K VGA card operating in screen mode 9. Footnote 2 on the bottom of Page 314 of the "Microsoft Basic 7.0: Language Reference" manual states the following:
   Pages = Screen memory divided by page size. Eight page maximum,
           one page minimum.
The page size of screen 9 for VGA is 128K. Applying the above formula, we get the following:
   Pages = 512K / 128K = 4 pages
However, 4 pages is incorrect because all the memory above 256K on the VGA card is not usable. Therefore, the maximum number of pages is as follows:
   Pages = 256K / 128K = 2 pages

  • Microsoft QuickBasic 2.0
  • Microsoft QuickBasic 2.01
  • Microsoft QuickBasic 3.0
  • Microsoft QuickBasic 4.0
  • Microsoft QuickBASIC 4.0b
  • Microsoft QuickBasic 4.5 for MS-DOS
  • Microsoft BASIC Compiler 6.0
  • Microsoft BASIC Compiler 6.0b
  • Microsoft BASIC Professional Development System 7.0
Retired KB ArticleRetired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.