]> git.sur5r.net Git - cc65/commitdiff
Add dummy kbhit(), remove redundant documentation for cgetc().
authorStephan Mühlstrasser <stephan.muehlstrasser@web.de>
Thu, 12 Feb 2015 21:54:21 +0000 (22:54 +0100)
committerStephan Mühlstrasser <stephan.muehlstrasser@web.de>
Thu, 12 Feb 2015 21:54:21 +0000 (22:54 +0100)
doc/osi.sgml
libsrc/osic1p/kbhit.s [new file with mode: 0644]

index 76c56fac748c84d9e1966d4dfda9c1b0130dd536..514ef622e321a3ca7b5ec978a8837e26fdb02c1a 100644 (file)
@@ -139,8 +139,8 @@ There are no loadable drivers available.
 
 <sect1>conio implementation<p>
 
-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.
 
 <sect1>stdio implementation<p>
 
diff --git a/libsrc/osic1p/kbhit.s b/libsrc/osic1p/kbhit.s
new file mode 100644 (file)
index 0000000..42db7a5
--- /dev/null
@@ -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