-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathterminal.h
127 lines (105 loc) · 2.73 KB
/
terminal.h
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
/**
* PLATOTERM for Plan 9
*
* A PLATO terminal for services such as
* CYBER1.ORG and IRATA.ONLINE
*
* Author: Thomas Cherryhomes
*
* License: GPL 3.0
*
* terminal.h - Terminal state machine functions
*/
#ifndef TERMINAL_H
#define TERMINAL_H
#include "protocol.h"
/**
* terminal_init()
* Initialize terminal state
*/
void terminal_init(void);
/**
* terminal_initial_position()
* Set terminal initial position after splash screen.
*/
void terminal_initial_position(void);
/**
* terminal_set_tty(void) - Switch to TTY mode
*/
void terminal_set_tty(void);
/**
* terminal_set_plato(void) - Switch to PLATO mode
*/
void terminal_set_plato(void);
/**
* terminal_get_features(void) - Inquire about terminal ASCII features
*/
unsigned char terminal_get_features(void);
/**
* terminal_get_type(void) - Return the appropriate terminal type
*/
unsigned char terminal_get_type(void);
/**
* terminal_get_subtype(void) - Return the appropriate terminal subtype
*/
unsigned char terminal_get_subtype(void);
/**
* terminal_get_load_file(void) - Return the appropriate terminal loadfile (should just be 0)
*/
unsigned char terminal_get_load_file(void);
/**
* terminal_get_configuration(void) - Return the terminal configuration
*/
unsigned char terminal_get_configuration(void);
/**
* terminal_get_char_address(void) - Return the base address of the character set.
*/
unsigned short terminal_get_char_address(void);
/**
* terminal_mem_read - Read a byte of program memory.
* not needed for our terminal, but must
* be decoded.
*/
padByte terminal_mem_read(padWord addr);
/**
* terminal_mem_load - Write a byte to non-character memory.
* not needed for our terminal, but must be decoded.
*/
void terminal_mem_load(padWord addr, padWord value);
/**
* terminal_char_load - Store a character into the user definable
* character set.
*/
void terminal_char_load(padWord charnum, charData theChar);
/**
* terminal_mode_5, 6, and 7 are basically stubbed.
*/
void terminal_mode_5(padWord value);
void terminal_mode_6(padWord value);
void terminal_mode_7(padWord value);
/**
* terminal_ext_allow - External Input allowed. Not implemented.
*/
void terminal_ext_allow(padBool allow);
/**
* terminal_set_ext_in - Set which device to get input from.
* Not implemented
*/
void terminal_set_ext_in(padWord device);
/**
* terminal_set_ext_out - Set which device to send external data to.
* Not implemented
*/
void terminal_set_ext_out(padWord device);
/**
* terminal_ext_in - get an external input from selected device.
* Not implemented.
*/
padByte terminal_ext_in(void);
/**
* terminal_ext_out - Send an external output to selected device
* Not implemented.
*/
void terminal_ext_out(padByte value);
#endif