kthacker | 6de6775 | 2006-04-17 15:02:26 +0000 | [diff] [blame] | 1 | /* |
| 2 | CONIO.H - Console I/O library for the Amsrad CPC |
| 3 | To use with the Small Devices C Compiler |
| 4 | CONIO.H is a implementation of the Contiki CONIO.H (Derived from the borland CONIO.H) |
| 5 | |
| 6 | 2003 H. Hansen |
| 7 | */ |
| 8 | |
| 9 | #ifndef __conio_h__ |
| 10 | #define __conio_h__ |
| 11 | |
| 12 | #include <stdio.h> |
| 13 | #include <stdlib.h> |
| 14 | #include "arch.h" |
| 15 | |
| 16 | #define CH_ULCORNER 0x096 |
| 17 | #define CH_URCORNER 0x09c |
| 18 | #define CH_LLCORNER 0x093 |
| 19 | #define CH_LRCORNER 0x099 |
| 20 | |
| 21 | void clrscr (void); |
| 22 | |
| 23 | unsigned char kbhit (void); |
| 24 | |
Adrien Destugues | 0ff774a | 2016-01-22 23:27:44 +0100 | [diff] [blame] | 25 | void gotox (unsigned char x) __z88dk_fastcall; |
kthacker | 6de6775 | 2006-04-17 15:02:26 +0000 | [diff] [blame] | 26 | |
Adrien Destugues | 0ff774a | 2016-01-22 23:27:44 +0100 | [diff] [blame] | 27 | void gotoy (unsigned char y) __z88dk_fastcall; |
kthacker | 6de6775 | 2006-04-17 15:02:26 +0000 | [diff] [blame] | 28 | |
Adrien Destugues | 715554f | 2016-01-23 19:48:57 +0100 | [diff] [blame] | 29 | void gotoyx (unsigned char y, unsigned char x) __z88dk_callee; |
| 30 | #define gotoxy(x,y) gotoyx(y,x) |
kthacker | 6de6775 | 2006-04-17 15:02:26 +0000 | [diff] [blame] | 31 | |
| 32 | unsigned char wherex (void); |
| 33 | |
| 34 | unsigned char wherey (void); |
| 35 | |
Adrien Destugues | 0ff774a | 2016-01-22 23:27:44 +0100 | [diff] [blame] | 36 | void cputc (char c) __z88dk_fastcall; |
kthacker | 6de6775 | 2006-04-17 15:02:26 +0000 | [diff] [blame] | 37 | |
Adrien Destugues | 5ce1414 | 2016-01-24 23:30:59 +0100 | [diff] [blame] | 38 | void cputcyx (unsigned char y, unsigned char x, char c) __z88dk_callee; |
| 39 | #define cputcxy(x,y,c) cputcyx(y,x,c) |
kthacker | 6de6775 | 2006-04-17 15:02:26 +0000 | [diff] [blame] | 40 | |
Adrien Destugues | 69a6e72 | 2017-06-03 10:17:17 +0200 | [diff] [blame^] | 41 | void cputs (const char* s) __z88dk_fastcall; |
| 42 | void cputsn(const char *str, unsigned char len) __z88dk_callee; |
kthacker | 6de6775 | 2006-04-17 15:02:26 +0000 | [diff] [blame] | 43 | |
| 44 | char cgetc (void); |
| 45 | |
Adrien Destugues | 0ff774a | 2016-01-22 23:27:44 +0100 | [diff] [blame] | 46 | void revers (char) __z88dk_fastcall; |
kthacker | 6de6775 | 2006-04-17 15:02:26 +0000 | [diff] [blame] | 47 | |
Adrien Destugues | 0ff774a | 2016-01-22 23:27:44 +0100 | [diff] [blame] | 48 | void textcolor (unsigned char color) __z88dk_fastcall; |
kthacker | 6de6775 | 2006-04-17 15:02:26 +0000 | [diff] [blame] | 49 | |
Adrien Destugues | 0ff774a | 2016-01-22 23:27:44 +0100 | [diff] [blame] | 50 | void bgcolor (unsigned char color) __z88dk_fastcall; |
kthacker | 6de6775 | 2006-04-17 15:02:26 +0000 | [diff] [blame] | 51 | |
Adrien Destugues | 0ff774a | 2016-01-22 23:27:44 +0100 | [diff] [blame] | 52 | void bordercolor (unsigned char color) __z88dk_fastcall; |
kthacker | 6de6775 | 2006-04-17 15:02:26 +0000 | [diff] [blame] | 53 | |
Adrien Destugues | 0ff774a | 2016-01-22 23:27:44 +0100 | [diff] [blame] | 54 | void chline (unsigned char length) __z88dk_fastcall; |
kthacker | 6de6775 | 2006-04-17 15:02:26 +0000 | [diff] [blame] | 55 | |
Adrien Destugues | 715554f | 2016-01-23 19:48:57 +0100 | [diff] [blame] | 56 | void chlineyx (unsigned char y, unsigned char x, unsigned char length) __z88dk_callee; |
| 57 | #define chlinexy(x,y,l) chlineyx(y,x,l) |
kthacker | 6de6775 | 2006-04-17 15:02:26 +0000 | [diff] [blame] | 58 | |
Adrien Destugues | 0ff774a | 2016-01-22 23:27:44 +0100 | [diff] [blame] | 59 | void cvline (unsigned char length) __z88dk_fastcall; |
kthacker | 6de6775 | 2006-04-17 15:02:26 +0000 | [diff] [blame] | 60 | |
Adrien Destugues | 715554f | 2016-01-23 19:48:57 +0100 | [diff] [blame] | 61 | void cvlineyx (unsigned char y, unsigned char x, unsigned char length) __z88dk_callee; |
| 62 | #define cvlinexy(x,y,l) cvlineyx(y,x,l) |
kthacker | 6de6775 | 2006-04-17 15:02:26 +0000 | [diff] [blame] | 63 | |
Adrien Destugues | 0ff774a | 2016-01-22 23:27:44 +0100 | [diff] [blame] | 64 | void cclear (unsigned char length) __z88dk_fastcall; |
kthacker | 6de6775 | 2006-04-17 15:02:26 +0000 | [diff] [blame] | 65 | |
kthacker | 6de6775 | 2006-04-17 15:02:26 +0000 | [diff] [blame] | 66 | void screensize (unsigned char* x, unsigned char* y); |
| 67 | |
| 68 | #endif /* __conio_h__ */ |
| 69 | |