BASIC-DOS

A PCjs Retro-Programming Project

BASIC-DOS is on Twitter Project maintained by jeffpar

BASIC-DOS Manual

BASIC-DOS Keyboard Commands

Keyboard commands include:

To read keys from a BASIC program, use the INKEY$ function. For a summary of the keys used to edit commands, see Typing Commands or type KEYS.

To read a line from the keyboard, use the INPUT or LINE INPUT statement.

KEY

KEY ON|OFF
KEY n,string

KEY ON and KEY OFF are accepted for compatibility with Microsoft BASIC, but do nothing, since BASIC-DOS doesn’t display function keys.

In Microsoft BASIC, KEY n,string makes function key n (1-10) type the string. BASIC-DOS accepts it, too (a key number other than 1-10 is an “Illegal function call”), but doesn’t assign strings to the function keys: they always return their key codes (eg, F1 is CHR$(0)+CHR$(59) for INKEY$), as they do in Microsoft BASIC after KEY n,”” (which is how programs like COMM.BAS free the function keys for their own use). KEY n,string isn’t available on low memory systems (see Low Memory).

« Clock CommandsMouse Commands »

Copyright (c) 2020-2026 Jeff Parsons Released under MIT License