aboutsummaryrefslogtreecommitdiff
path: root/src/conio.c.old
blob: 2742ab6411fc55ffe36f7f5d06aeaa0c704e8ea7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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();
}