]> git.sur5r.net Git - cc65/commitdiff
Begin to implement C1P conio features.
authorStephan Mühlstrasser <stephan.muehlstrasser@web.de>
Sat, 8 Nov 2014 23:58:32 +0000 (00:58 +0100)
committerStephan Mühlstrasser <stephan.muehlstrasser@web.de>
Sat, 8 Nov 2014 23:58:32 +0000 (00:58 +0100)
include/c1p.h [new file with mode: 0644]
include/conio.h
libsrc/c1p/cgetc.s [new file with mode: 0644]

diff --git a/include/c1p.h b/include/c1p.h
new file mode 100644 (file)
index 0000000..cea31b0
--- /dev/null
@@ -0,0 +1,41 @@
+/*****************************************************************************/\r
+/*                                                                           */\r
+/*                                   c1p.h                                   */\r
+/*                                                                           */\r
+/*                Challenger 1P system specific definitions                  */\r
+/*                                                                           */\r
+/*                                                                           */\r
+/*                                                                           */\r
+/* (C) 2014 Stephan Muehlstrasser                                            */\r
+/*                                                                           */\r
+/*                                                                           */\r
+/* This software is provided 'as-is', without any expressed or implied       */\r
+/* warranty.  In no event will the authors be held liable for any damages    */\r
+/* arising from the use of this software.                                    */\r
+/*                                                                           */\r
+/* Permission is granted to anyone to use this software for any purpose,     */\r
+/* including commercial applications, and to alter it and redistribute it    */\r
+/* freely, subject to the following restrictions:                            */\r
+/*                                                                           */\r
+/* 1. The origin of this software must not be misrepresented; you must not   */\r
+/*    claim that you wrote the original software. If you use this software   */\r
+/*    in a product, an acknowledgment in the product documentation would be  */\r
+/*    appreciated but is not required.                                       */\r
+/* 2. Altered source versions must be plainly marked as such, and must not   */\r
+/*    be misrepresented as being the original software.                      */\r
+/* 3. This notice may not be removed or altered from any source              */\r
+/*    distribution.                                                          */\r
+/*                                                                           */\r
+/*****************************************************************************/\r
+\r
+#ifndef _C1P_H\r
+#define _C1P_H\r
+\r
+/* Check for errors */\r
+#if !defined(__OSIC1P__)\r
+#  error "This module may only be used when compiling for the Challenger 1P!"\r
+#endif\r
+\r
+/* empty for now */\r
+\r
+#endif\r
index 54667a3ca90e8e8164b2e1d3a355d489c8ca8940..f59375a633b88f0a1f4c7ad633a990319b2ccb31 100644 (file)
@@ -77,6 +77,8 @@
 #  include <lynx.h>
 #elif defined(__NES__)
 #  include <nes.h>
+#elif defined(__OSIC1P__)
+#  include <c1p.h>
 #endif
 
 
diff --git a/libsrc/c1p/cgetc.s b/libsrc/c1p/cgetc.s
new file mode 100644 (file)
index 0000000..483c2f2
--- /dev/null
@@ -0,0 +1,11 @@
+;\r
+; char cgetc (void);\r
+;\r
+\r
+        .export         _cgetc\r
+        .include        "c1p.inc"\r
+\r
+; Use INPUT routine from 65V PROM MONITOR\r
+_cgetc:\r
+        jsr $FEED\r
+        rts\r