For the user who wishes to use all possible CP/M function calls, the routine @BDOS from the run-time package may be declared as external. Passing the function call and parameters required to @BDOS allows the use of all CP/M features. The @BDOS external definition is listed below:
EXTERNAL FUNCTION @BDOS(FUNC:INTEGER; PARM:WORD) : INTEGER;
KEYPRESSED, a sample function which uses the @BDOS function, is listed below. It returns true if a key is pressed, and returns false if no key is pressed.
FUNCTION KEYPRESSED : BOOLEAN; BEGIN KEYPRESSED := (@BDOS(11,0) <> 0) END.