blob: 49163f0579d915668446800d53d824d322641ed4 [file] [log] [blame]
kthacker6de67752006-04-17 15:02:26 +00001/*
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
21void clrscr (void);
22
23unsigned char kbhit (void);
24
Adrien Destugues0ff774a2016-01-22 23:27:44 +010025void gotox (unsigned char x) __z88dk_fastcall;
kthacker6de67752006-04-17 15:02:26 +000026
Adrien Destugues0ff774a2016-01-22 23:27:44 +010027void gotoy (unsigned char y) __z88dk_fastcall;
kthacker6de67752006-04-17 15:02:26 +000028
Adrien Destugues715554f2016-01-23 19:48:57 +010029void gotoyx (unsigned char y, unsigned char x) __z88dk_callee;
30#define gotoxy(x,y) gotoyx(y,x)
kthacker6de67752006-04-17 15:02:26 +000031
32unsigned char wherex (void);
33
34unsigned char wherey (void);
35
Adrien Destugues0ff774a2016-01-22 23:27:44 +010036void cputc (char c) __z88dk_fastcall;
kthacker6de67752006-04-17 15:02:26 +000037
Adrien Destugues5ce14142016-01-24 23:30:59 +010038void cputcyx (unsigned char y, unsigned char x, char c) __z88dk_callee;
39#define cputcxy(x,y,c) cputcyx(y,x,c)
kthacker6de67752006-04-17 15:02:26 +000040
Adrien Destugues69a6e722017-06-03 10:17:17 +020041void cputs (const char* s) __z88dk_fastcall;
42void cputsn(const char *str, unsigned char len) __z88dk_callee;
kthacker6de67752006-04-17 15:02:26 +000043
44char cgetc (void);
45
Adrien Destugues0ff774a2016-01-22 23:27:44 +010046void revers (char) __z88dk_fastcall;
kthacker6de67752006-04-17 15:02:26 +000047
Adrien Destugues0ff774a2016-01-22 23:27:44 +010048void textcolor (unsigned char color) __z88dk_fastcall;
kthacker6de67752006-04-17 15:02:26 +000049
Adrien Destugues0ff774a2016-01-22 23:27:44 +010050void bgcolor (unsigned char color) __z88dk_fastcall;
kthacker6de67752006-04-17 15:02:26 +000051
Adrien Destugues0ff774a2016-01-22 23:27:44 +010052void bordercolor (unsigned char color) __z88dk_fastcall;
kthacker6de67752006-04-17 15:02:26 +000053
Adrien Destugues0ff774a2016-01-22 23:27:44 +010054void chline (unsigned char length) __z88dk_fastcall;
kthacker6de67752006-04-17 15:02:26 +000055
Adrien Destugues715554f2016-01-23 19:48:57 +010056void chlineyx (unsigned char y, unsigned char x, unsigned char length) __z88dk_callee;
57#define chlinexy(x,y,l) chlineyx(y,x,l)
kthacker6de67752006-04-17 15:02:26 +000058
Adrien Destugues0ff774a2016-01-22 23:27:44 +010059void cvline (unsigned char length) __z88dk_fastcall;
kthacker6de67752006-04-17 15:02:26 +000060
Adrien Destugues715554f2016-01-23 19:48:57 +010061void cvlineyx (unsigned char y, unsigned char x, unsigned char length) __z88dk_callee;
62#define cvlinexy(x,y,l) cvlineyx(y,x,l)
kthacker6de67752006-04-17 15:02:26 +000063
Adrien Destugues0ff774a2016-01-22 23:27:44 +010064void cclear (unsigned char length) __z88dk_fastcall;
kthacker6de67752006-04-17 15:02:26 +000065
kthacker6de67752006-04-17 15:02:26 +000066void screensize (unsigned char* x, unsigned char* y);
67
68#endif /* __conio_h__ */
69