File: trs_printer.c

package info (click to toggle)
xtrs 4.9c-4
  • links: PTS
  • area: contrib
  • in suites: stretch
  • size: 2,240 kB
  • ctags: 1,430
  • sloc: ansic: 19,941; makefile: 243; csh: 132; sh: 129
file content (34 lines) | stat: -rw-r--r-- 819 bytes parent folder | download
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
/*
 * Copyright (C) 1992 Clarendon Hill Software.
 *
 * Permission is granted to any individual or institution to use, copy,
 * or redistribute this software, provided this copyright notice is retained. 
 *
 * This software is provided "as is" without any expressed or implied
 * warranty.  If this software brings on any sort of damage -- physical,
 * monetary, emotional, or brain -- too bad.  You've got no one to blame
 * but yourself. 
 *
 * The software may be modified for your own purposes, but modified versions
 * must retain this notice.
 */

#include "z80.h"
#include "trs.h"

extern void trs_printer_write(int value)
{
    if(value == 0x0D)
    {
	putchar('\n');
    }
    else
    {
	putchar(value);
    }
}

int trs_printer_read()
{
    return 0x30;	/* printer selected, ready, with paper, not busy */
}