;===================================================
; PROGRAM TITLE:  CONSOLE CHARACTER
;
; THIS ROUTINE WILL RETURN A CHARACTER DIRECTLY FROM
; THE KEYBOARD WITH NO ECHO.
; Much appreciation to Mr. William Kellner for this.
; Commented by Ray Penley.
;
;	=========================
;	=	WARNING 	=
;	= CP/M VERSION 2.x ONLY =
;	=========================
;
; TYPE
;   BYTE = 0..255;
;
; CALL AS:
;     FUNCTION CONCHAR: BYTE; EXTERNAL;
;
	NAME	conchar
	ENTRY	conchar
;
conchar:
	; save these regs when leaving for unfriendly territory.
	push	x
	push	y
	exx
	push	h
	push	b
	exx
	;
	; CP/M version 2.x direct IO function
	; returns char in 'A' register.
	;
	mvi	c,6	; direct I/O function
	mvi	e,0ffh	; console input
	call	5	; call CP/M entry point.
	;
	; must restore our regs.
	;
	exx
	pop	b
	pop	h
	exx
	pop	y
	pop	x
	;
	; Pascal/Z functions return value in 'DE' regs.
	;
	mov	e,a	; low byte to in "E"
	XRA	A	; accumulator must return a zero.
	mov	d,a	; high byte to "D"
	ret		; Done, return
	;
	;
e,a	; low byte to in "E"
	XRA	A	; accumulator must return a zero.
	mov	d,a	; high byte to "D"
	