chiark / gitweb /
Initial revision
[ssr] / StraySrc / Libraries / Sapphire / sail / _sh / termite
1 ;
2 ; termite.sh
3 ;
4 ; Implementation of Termite specific instructions
5 ;
6 ; © 1995 Straylight
7 ;
8
9 ;----- Overview -------------------------------------------------------------
10 ;
11 ; Functions provided:
12 ;
13 ;  termite_beep
14 ;  termite_break
15 ;  termite_call
16 ;  termite_chain
17 ;  termite_close
18 ;  termite_cls
19 ;  termite_download
20 ;  termite_error
21 ;  termite_exec
22 ;  termite_finish
23 ;  termite_hangup
24 ;  termite_lclear
25 ;  termite_lecho
26 ;  termite_linput
27 ;  termite_lnewline
28 ;  termite_log
29 ;  termite_newsession
30 ;  termite_oscli
31 ;  termite_rclear
32 ;  termite_recho
33 ;  termite_report
34 ;  termite_rinput
35 ;  termite_rnewline
36 ;  termite_spool
37 ;  termite_syscall
38 ;  termite_upload
39 ;  termite_wait
40 ;  termite_watchfor
41 ;  termite_remoteInput
42 ;  termite_copyString
43 ;  termite_doLEcho
44 ;  termite_doREcho
45
46                 [       :LNOT::DEF:termite__dfn
47                 GBLL    termite__dfn
48
49 ; --- termite_beep ---
50
51                 IMPORT  termite_beep
52
53 ; --- termite_break ---
54
55                 IMPORT  termite_break
56
57 ; --- termite_call ---
58
59                 IMPORT  termite_call
60
61 ; --- termite_chain ---
62
63                 IMPORT  termite_chain
64
65 ; --- termite_close ---
66
67                 IMPORT  termite_close
68
69 ; --- termite_cls ---
70
71                 IMPORT  termite_cls
72
73 ; --- termite_download ---
74
75                 IMPORT  termite_download
76
77 ; --- termite_error ---
78
79                 IMPORT  termite_error
80
81 ; --- termite_exec ---
82
83                 IMPORT  termite_exec
84
85 ; --- termite_finish ---
86
87                 IMPORT  termite_finish
88
89 ; --- termite_hangup ---
90
91                 IMPORT  termite_hangup
92
93 ; --- termite_lclear ---
94
95                 IMPORT  termite_lclear
96
97 ; --- termite_lecho ---
98
99                 IMPORT  termite_lecho
100
101 ; -- termite_linput ---
102
103                 IMPORT  termite_linput
104
105 ; --- termite_lnewline ---
106
107                 IMPORT  termite_lnewline
108
109 ; --- termite_log ---
110
111                 IMPORT  termite_log
112
113 ; --- termite_newsession ---
114
115                 IMPORT  termite_newsession
116
117 ; --- termite_oscli ---
118
119                 IMPORT  termite_oscli
120
121 ; --- termite_rclear ---
122
123                 IMPORT  termite_rclear
124
125 ; --- termite_recho ---
126
127                 IMPORT  termite_recho
128
129 ; --- termite_report ---
130
131                 IMPORT  termite_report
132
133 ; --- termite_rinput ---
134
135                 IMPORT  termite_rinput
136
137 ; --- termite_rnewline ---
138
139                 IMPORT  termite_rnewline
140
141 ; --- termite_spool ---
142
143                 IMPORT  termite_spool
144
145 ; --- termite_syscall ---
146
147                 IMPORT  termite_syscall
148
149 ; --- termite_upload ---
150
151                 IMPORT  termite_upload
152
153 ; --- termite_wait ---
154
155                 IMPORT  termite_wait
156
157 ; --- termite_watchfor ---
158
159                 IMPORT  termite_watchfor
160
161 ; --- termite_remoteInput ---
162 ;
163 ; On entry:     R0 == handle of script
164 ;               R2 == buffer containing bytes read
165 ;               R3 == number of bytes in buffer
166 ;               R11 == upcall block
167 ;
168 ; On exit:      R2 == new buffer containing bytes to put into ring buffer
169 ;               R3 == number of bytes in this buffer
170 ;
171 ; Use:          If we are not doing a watchfor, then this call will return
172 ;               immediately, resulting in all the buffer being sent
173 ;               to the ring buffer.
174 ;               If we are in a watchfor, then all data received, up until
175 ;               a match, is echoed immediatley, and not sent to the buffer.
176
177                 IMPORT  termite_remoteInput
178
179 ; --- termite_copyString ---
180 ;
181 ; On entry:     R0 == buffer to copy string to
182 ;               R1 == point to the string
183 ;               R2 == length of string to copy
184 ;
185 ; On exit:      --
186 ;
187 ; Use:          Copies the string into the buffer.
188
189                 IMPORT  termite_copyString
190
191 ; --- termite_doLEcho ---
192 ;
193 ; On entry:     R2 == pointer to the buffer
194 ;               R3 == number of bytes to send
195 ;
196 ; On exit:      --
197 ;
198 ; Use:          Echos the buffer to local and remote according to the
199 ;               current flags, assuming the buffer came from the local input
200
201                 IMPORT  termite_doLEcho
202
203 ; --- termite_doREcho ---
204 ;
205 ; On entry:     R2 == pointer to the buffer
206 ;               R3 == number of bytes to send
207 ;
208 ; On exit:      --
209 ;
210 ; Use:          Echos the buffer to local and remote according to the
211 ;               current flags, assuming the buffer came from remote input
212
213                 IMPORT  termite_doREcho
214
215                 ]
216
217 ;----- That's all, folks ----------------------------------------------------
218
219                 END