diff options
| author | B. Watson <urchlay@slackware.uk> | 2026-02-11 13:26:57 -0500 |
|---|---|---|
| committer | B. Watson <urchlay@slackware.uk> | 2026-02-11 13:26:57 -0500 |
| commit | b7b86e3a26d4bfba9c49f0a24ec030a7b3ebd8a3 (patch) | |
| tree | d2cb7323c78a4983e2a498110a077aaf24d1f696 /src/conio.c | |
| download | fujinet-chat-b7b86e3a26d4bfba9c49f0a24ec030a7b3ebd8a3.tar.gz | |
initial commit
Diffstat (limited to 'src/conio.c')
| -rw-r--r-- | src/conio.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/conio.c b/src/conio.c new file mode 100644 index 0000000..2742ab6 --- /dev/null +++ b/src/conio.c @@ -0,0 +1,37 @@ +/** + * Simple conio for E: + */ + +#include <atari.h> +#include <string.h> +#include "cio.h" + +void printl(const char* c, int l) +{ + OS.iocb[0].buffer=c; + OS.iocb[0].buflen=l; + OS.iocb[0].command=IOCB_PUTCHR; + ciov(); +} + +void printc(char* c) +{ + OS.iocb[0].buffer=c; + OS.iocb[0].buflen=1; + OS.iocb[0].command=IOCB_PUTCHR; + ciov(); +} + +void print(const char* c) +{ + int l=strlen(c); + printl(c,l); +} + +void get_line(char* buf, unsigned char len) +{ + OS.iocb[0].buffer=buf; + OS.iocb[0].buflen=len; + OS.iocb[0].command=IOCB_GETREC; + ciov(); +} |
