KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q42448: Unwanted R6013: Illegal Far Pointer Use

Article: Q42448
Product(s): See article
Version(s): 2.00
Operating System(s): MS-DOS
Keyword(s): ENDUSER | | mspl13_c
Last Modified: 2-MAY-1989

Problem:

When I set a far pointer to an absolute address, such as Video memory,
I get a run-time error "R6013 Illegal far pointer use".

Response:

To set pointers to an address below your program's data segment(s),
you must first disable pointer checking in Compiler Flags, which can
be accessed from Make Option under the Options menu; or use the
check_pointer pragma to turn pointer checking on and off.

QuickC 2.00 has a feature that adds code to the executable to check
for null pointer assignments and out-of-range pointers. Any attempt to
store data into a pointer that points into the program's code
segment(s) or any place before the data segment(s) produces this
run-time error. This information is documented in the "Microsoft
QuickC Tool Kit Version 2.0" manual, Section 4.3.34 /Zr (Check
Pointers), Page 104-105.

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.