🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.cpm
Article #5413

Flushing the one-character BDOS console input buffer

#5413
From: Keith Petersen
Date: Fri, 31 Oct 1986 17:12
13 lines
925 bytes
Russ, this works for my programs that use function 6 for portability.
This will flush the BDOS buffer if there are any characters waiting.

	MVI	C,CONSTAT	;BDOS console status function
	CALL	BDOS
	ORA	A		;check for character pending
	JZ	SKIPIT		;zero means nothing there
	MVI	C,CONIN		;BDOS console input function
	CALL	BDOS		;go get it
;
SKIPIT:	(do your next task here, ignoring any character gathered above)

--Keith
Technical Details
Message-ID: <5055@brl-smoke.ARPA>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!think!rutgers!brl-adm!brl-smoke!smoke!W8SDZ@SIMTEL20.ARPA

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!think!rutgers!brl-adm!brl-smoke!smoke!W8SDZ@SIMTEL20.ARPA
From: W8SDZ@SIMTEL20.ARPA (Keith Petersen)
Newsgroups: net.micro.cpm
Subject: Flushing the one-character BDOS console input buffer
Message-ID: <5055@brl-smoke.ARPA>
Date: Fri, 31-Oct-86 12:12:58 EST
Article-I.D.: brl-smok.5055
Posted: Fri Oct 31 12:12:58 1986
Date-Received: Sun, 2-Nov-86 23:55:46 EST
Sender: news@brl-smoke.ARPA
Lines: 13