From 88df129215e27233d63afce837b4955ef0a90c7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20M=C3=BChlstrasser?= Date: Thu, 12 Feb 2015 22:54:21 +0100 Subject: [PATCH] Add dummy kbhit(), remove redundant documentation for cgetc(). --- doc/osi.sgml | 4 ++-- libsrc/osic1p/kbhit.s | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 libsrc/osic1p/kbhit.s diff --git a/doc/osi.sgml b/doc/osi.sgml index 76c56fac7..514ef622e 100644 --- a/doc/osi.sgml +++ b/doc/osi.sgml @@ -139,8 +139,8 @@ There are no loadable drivers available. conio implementation

-The conio implementation is complete except for the kbhit() function. A -call to cgetc() always blocks until a character is entered. +The conio implementation is complete except for a working kbhit() function. +kbhit() currently returns true unconditionally. stdio implementation

diff --git a/libsrc/osic1p/kbhit.s b/libsrc/osic1p/kbhit.s new file mode 100644 index 000000000..42db7a5e6 --- /dev/null +++ b/libsrc/osic1p/kbhit.s @@ -0,0 +1,11 @@ +; +; int kbhit (void); +; +; Currently a dummy function that returns always true + + .export _kbhit + +_kbhit: + lda #$01 ; load low byte with true value + ldx #$00 ; load high byte + rts