Input/output functions for E-MMI

Function 01: CONSOLE INPUT

Actions: Input symbol from keyboard into specified register

Details: wait, if symbol is not ready; automatically print symbol on display; try to terminate program, when "CTRL"+"C" combination is pressed

Example:
00 05 01 07TRAP 05/01 $07 get symbol from keyboard to $7


Function 02: CONSOLE OUTPUT

Actions: print symbol from specified register

Example:
E3 03 0031SETL $03, 31 put code of symbol '1' into $3
00 05 02 03TRAP 05/02 $03 print symbol from $3 on display


Function 06: DIRECT CONSOLE

Actions: Input symbol from keyboard into specified register or print it

Details:



Function 09: STRING OUTPUT

Actions: Print string till symbol '$'
Ending symbol '$' is a very old tradition, upcoming to CP/M. I'm not sure it is a good idea to follow this custom, but in current E-MMI version it is supported

Details: E-MMI software cuts the string if it is longer than 250 symbols

Example:
E3 00 00E1SETL $00, E1 address of string buffer to $0
00 05 09 00TRAP 05/09 $00 print string


Function 0A: BUFFERED INPUT

Actions: input text string till "Enter"

Details: Specified register before function call must show to free memory area and its first byte is set to maximum string length. After its work, function returns the following information: the number of entered symbols (CR symbol is not included into this number!) in the second byte of buffer; then input string is placed (code CR is presented).

Example: will be published later

Function 0B: CONSOLE STATUS

Actions: returns 0 to specified register if keyboard symbol is not ready and FFh otherwise

Example:
00 05 0B 07TRAP 05/0B $07 get keyboard status to $7


Function 0C: GET VERSION

Actions: print date of I/O functions release

Example:
00 05 0C 00TRAP 05/0C $00