Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/38121

From BetaArchive Wiki

COBOL 3.0 Extension Subroutine X“85” Can Hang at Run Time

PSS ID Number: Q38121 Article last modified on 04-20-1993

3.00 3.00a | 3.00 3.00a MS-DOS | OS/2

The information in this article applies to:
- Microsoft COBOL for MS-DOS and OS/2, versions 3.0 and 3.0a

Summary: When compiled in COBOL version 3.0 and run, the program below (which executes the CALL X“85” statement) will hang the computer instead of returning a 1-byte value as expected. A complete shut-down (cold boot) is required to release from the hang. Microsoft has confirmed this to be a problem in COBOL versions 3.0 and 3.0a. The computer does not hang under version 3.0a, but it will return to MS-DOS without any output. This problem was corrected in Microsoft COBOL Professional Development System version 4.0 for MS-DOS and MS OS/2. The program runs as expected compiled and run inside the COBOL version 3.0 or 3.0a Animator.

More Information: CALL X“85” calls a special assembly-language subprogram that returns a 1-byte value at a desired segment and offset. It is similar to the PEEK statement found in Microsoft BASIC. The following is a code example: Compile and LINK with the following default directives: WORKING-STORAGE SECTION. 01 MYSEGMENT PIC 9(4) VALUE 2. 01 MYOFFSET PIC 9(4) VALUE 2. 01 MYDATAVALUE PIC X. PROCEDURE DIVISION. CALL X“85” USING MYSEGMENT, MYOFFSET, MYDATAVALUE. display MYDATAVALUE. STOP RUN.

Additional reference words: 3.00 3.00a Copyright Microsoft Corporation 1993.