Date : Tue, 25 Nov 1980201:34:00-MST
From : Frank J. Wancho <FJW at MIT-MC>
Subject: BDOS Question
The following situation occurs with both CP/M 1.45 and 2.2 and I want
to know why:
LOOP: CALL RDTIME ; Reads clock ports and displays time
; using direct I/O to the console
; serial port.
CALL CONST ; Checks console input status only
CALL NZ,GKC ; If input, read console for command
JR LOOP
GKC: CALL CONIN ; Gets the pending character and does
; nothing with it.
CALL PRINT ; Prints a msg using BDOS
CALL GNC ; Waits for a response
; then jumps to appropriate subroutine
; based on character
The subroutine in question prints another message and waits for
confirmation, and then prints another prompt and waits for string
input using the READ BUFFER BDOS call.
Now here is the strange part: it takes TWO characters (not one) to
break out of the LOOP, and that first character shows up in the read
buffer. It can even be edited!
How did it end up in the read buffer?
Any clues to this mystery would be appreciated.
--Frank
(I have this sinking feeling that, as usual, I'm doing something
wrong, but I can't figure it out for the life of me. If so, I
apologize for taking up your time. If not, and it turns out to be a
bug in CP/M - however obscure, I think we should all know.)