Microsoft KB Archive/35884

CALL X“nn” Accesses DOS Interrupts, Screen, Keyboard, Ports

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

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

Summary: There are 22 special functions that use the CALL X“nn” format. These special functions can be used to directly interface with the screen, keyboard, memory, hardware ports, and MS-DOS interrupts. We cannot guarantee that these subprograms will be supported in future releases. They are designed to be used “as is.” These special functions are written in assembly language and are accessed by the CALL statement in the following form CALL special-function-number USING parameter-list where: special-function-number is a single byte parameter-list depends on the special function called Note that Microsoft COBOL Compiler versions earlier than Version 3.0 do not support these types of calls.

More Information: The parameters that you pass in these calls must be loaded immediately prior to the call because some of the functions alter the parameters during execution. You should take great care when using these calls. Calls such as X“84” (DOS interrupt), X“86”/X“96” (set memory value), and X“88”/X“97” (port output) can cause serious problems if the wrong values are passed. See Chapter 8 of the “Microsoft COBOL Compiler Version 3.0: Operating Guide” for specific details on these special functions. There are several articles in this knowledge base that contain instructions on calling specific routines. Note: Parameters used in these calls must be within the first 64K of the Data Division. These calls will not work if the parameters are defined in the linkage section of the program. The special functions available are the following:

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