PURPOSE: To efficiently perform input-output control with a simple constitution, by executing a key inputting process, printing process, and key execution in time division in response to a unique interrupt signal.
CONSTITUTION: In the course of an interruption processing routine, a printer control routine is firstly executed and a key scanning routine for discriminating depressed keys of a keyboard KBD is secondly executed in response to an interrupt signal SINT sent from a uinque timer TM. When a key buffer KBF is empty, namely, when a key buffer input pointer and key buffer output pointer are the same, execution is waited on the cyclic loop of a main routine, but when a key code is stored in the key buffer KBF by an interrupting process the key code is fetched and the execution is restarted. When the key code is to be printed, a print code is generated and stored in a print buffer PBF.