KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q21956: Using Page 2 in SCREEN 9 Gives "Illegal Function Call" on EGA

Article: Q21956
Product(s): See article
Version(s): 2.00 2.01 3.00 4.00 4.00b 4.50
Operating System(s): MS-DOS
Keyword(s): ENDUSER | | mspl13_basic
Last Modified: 11-JAN-1990

Question:

Why do I get an "Illegal Function Call" error message when I reference
Page 2 in SCREEN mode 9 on a computer with an EGA card? The following
is an example:

   SCREEN 9,1,2,2  'EGA mode=9, 1=colorswitch on, apage=2, vpage=2
   COLOR 2,0
   LINE (1,1)-(100,100)

Response:

Screen 9 does have two pages available, but the pages are referenced
as "0" and "1". Note that "2" is not a valid page number in screen 9.
The program will work correctly if coded as follows:

   SCREEN 9,1,1,1  'EGA mode=9, 1=colorswitch on, apage=1, vpage=1
   COLOR 2,0
   LINE (1,1)-(100,100)

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1986-2002.