(*Copyright (C) 2017, 2018, 2019 Karl Landstrom <karl@miasap.se>

This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.*)

MODULE Input0;
(**Access to keyboard and clock

Implements a subset of basic module Input applicable to console applications. Import with Input := Input0 to emphasize the compatibility.*)

(*implemented in C*)

	VAR TimeUnit*: INTEGER; (**clock ticks per second*)

	PROCEDURE Available*(): INTEGER;
(**returns the number of characters in the keyboard buffer*)
	RETURN 0
	END Available;

	PROCEDURE Read*(VAR ch: CHAR);
(**returns (and removes) the next character from the keyboard buffer. If the buffer is empty, Read waits until a key is pressed.*)
	END Read;

	PROCEDURE Time*(): INTEGER;
(**returns the time elapsed since system startup in units of size 1 / TimeUnit seconds*)
	RETURN 0
	END Time;

END Input0.
