summaryrefslogtreecommitdiffstats
path: root/lib16/conio.c
blob: 4e4526e3690f986b974d26d25478de80b450df4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <string.h>
#include <sys16.h>

int write(int fd, const void *buf, unsigned int count)
{
	int rv;

	asm volatile("int $0x80"
		     : "=a" (rv)
		     : "a" (4),	/* __NR_write */
		       "b" (1),
		       "c" (_KPTR(buf)),
		       "d" (count));

	return rv;
}

void puts(const char *s)
{
	/* XXX: should loop over this */
	write(1, s, strlen(s));
}