<title>GEOSLib docs
 <author>Maciej Witkowiak, <htmlurl url="mailto:ytm@elysium.pl" name="ytm@elysium.pl">
-<date>v1.5, 26.12.1999, 2000, 2001, 2002, 2003
+<date>v1.5, 26.12.1999, 2000, 2001, 2002, 2003, 2005
 <abstract>
 This is the documentation of cc65's GEOSLib, but information contained here may be also
 useful for writing GEOS applications in general.
 It is safe to use these standard includes and their contents:
 <tt/assert.h, conio.h, dio.h, errno.h, em.h, geos.h, joystick.h, modload.h, mouse.h, stdlib.h, string.h, tgi.h, time.h/
 <p>
+For <tt/time.h/ functions <tt/systime()/ and <tt/clock/ note that the resolution is one second.
+<p>
 It was not tested enough, but functions from these includes might work under GEOS:
 <tt/rs232.h, zlib.h/
 <p>
 
    Supreme GEOS header file
    includes all other headers
 
-   Maciej 'YTM/Alliance' Witkowiak, 27.10.1999
+   Maciej 'YTM/Elysium' Witkowiak, 27.10.1999
 */
 
 
 #include <geos/gdlgbox.h>
 #endif
 
-
+/* Character codes $80-$8F */
+/*  1  */
+/* 2 4 */
+/*  8  */
+#define CH_HLINE               128|0|2|4|0
+#define CH_VLINE               128|1|0|0|8
+#define CH_ULCORNER            128|1|2|0|0
+#define CH_URCORNER            128|1|0|4|0
+#define CH_LLCORNER            128|0|2|0|8
+#define CH_LRCORNER            128|0|0|4|8
+#define CH_TTEE                        128|1|2|4|0
+#define CH_RTEE                        128|1|0|4|8
+#define CH_BTEE                        128|0|2|4|8
+#define CH_LTEE                        128|1|2|0|8
+#define CH_CROSS               128|1|2|4|8
+
+/* Additional key defines */
+#define CH_F1                  133
+#define CH_F2                  137
+#define CH_F3                  134
+#define CH_F4                  138
+#define CH_F5                  135
+#define CH_F6                  139
+#define CH_F7                  136
+#define CH_F8                  140
+
+#define CH_CURS_UP             145
+#define CH_CURS_DOWN            17
+#define CH_CURS_LEFT           157
+#define CH_CURS_RIGHT           29
+#define CH_DEL                  20
+#define CH_INS                 148
+#define CH_ENTER               '\n'
+#define CH_STOP                          3
+#define CH_ESC                  27
 
 /* End of geos.h */
 #endif
-
-
-
 
 #elif defined(__NES__)
 #  define CLK_TCK              50      /* POSIX */
 #  define CLOCKS_PER_SEC       50      /* ANSI */
+#elif  defined(__GEOS__)
+#  define CLK_TCK              1       /* POSIX */
+#  define CLOCKS_PER_SEC       1       /* ANSI */
 #endif
 
 
 
 
 }
 
+clock_t clock(void) {
+
+    return _systime();
+
+}