2ee739cc |
1 | /* |
2 | * xload.h |
3 | * |
4 | * [Generated from xload, 08 November 1995] |
5 | */ |
6 | |
7 | #pragma include_only_once |
8 | #pragma force_top_level |
9 | |
10 | #ifndef __xload_h |
11 | #define __xload_h |
12 | |
13 | /*----- Overview ----------------------------------------------------------* |
14 | * |
15 | * Functions provided: |
16 | * |
17 | * xload_file |
18 | * xload_initBuf |
19 | * xload_killBuf |
20 | * xload_extend |
21 | * xload_doneBuf |
22 | * xload_done |
23 | * xload_failed |
24 | * xload_byte |
25 | * xload_word |
26 | * xload_block |
27 | */ |
28 | |
29 | /* --- xload_file --- * |
30 | * |
31 | * On entry: R0 == pointer to loader routine |
32 | * R1 == R10 value to pass to loader |
33 | * R2 == R12 value to pass to loader |
34 | * R3 == pointer to leafname of file (passed to loader in R0) |
35 | * R4 == pointer to filename to load from |
36 | * R5 == whether the file is safe (passed to loader in R1) |
37 | * |
38 | * On exit: May return an error |
39 | * |
40 | * Use: Calls a generalised loader routine to read data from a file. |
41 | */ |
42 | |
43 | extern routine xload_file; |
44 | |
45 | /* --- xload_initBuf --- * |
46 | * |
47 | * On entry: R0 == pointer to loader routine |
48 | * R1 == R10 value to pass to loader |
49 | * R2 == R12 value to pass to loader |
50 | * R3 == pointer to leafname of file (passed to loader in R0) |
51 | * |
52 | * On exit: R0 == pointer to load buffer |
53 | * R1 == size of load buffer |
54 | * May return an error |
55 | * |
56 | * Use: Starts a RAM transfer and starts up a generalised load |
57 | * routine. |
58 | */ |
59 | |
60 | extern routine xload_initBuf; |
61 | |
62 | /* --- xload_killBuf --- * |
63 | * |
64 | * On entry: -- |
65 | * |
66 | * On exit: -- |
67 | * |
68 | * Use: Does a buffer destroy for a failed load operation. |
69 | */ |
70 | |
71 | extern routine xload_killBuf; |
72 | |
73 | /* --- xload_extend --- * |
74 | * |
75 | * On entry: R1 == size of last buffer used for receiving |
76 | * |
77 | * On exit: R0 == pointer to new buffer |
78 | * R1 == size of new buffer |
79 | * May return an error |
80 | * |
81 | * Use: Performs a buffer extent operation during an xload RAM |
82 | * transfer. |
83 | */ |
84 | |
85 | extern routine xload_extend; |
86 | |
87 | /* --- xload_doneBuf --- * |
88 | * |
89 | * On entry: R1 == total size of data received |
90 | * |
91 | * On exit: R0 corrupted |
92 | * May return an error |
93 | * |
94 | * Use: Handles the last bufferful of a RAM load. |
95 | */ |
96 | |
97 | extern routine xload_doneBuf; |
98 | |
99 | /* --- xload_done --- * |
100 | * |
101 | * On entry: -- |
102 | * |
103 | * On exit: -- |
104 | * |
105 | * Use: Tidies up after a successful load job. |
106 | */ |
107 | |
108 | extern routine xload_done; |
109 | |
110 | /* --- xload_failed --- * |
111 | * |
112 | * On entry: R0 == pointer to error block |
113 | * |
114 | * On exit: -- |
115 | * |
116 | * Use: Tidies up a RAM transfer after an error. |
117 | */ |
118 | |
119 | extern routine xload_failed; |
120 | |
121 | /* --- xload_byte --- * |
122 | * |
123 | * On entry: -- |
124 | * |
125 | * On exit: CC if data read OK, and |
126 | * R0 == byte read |
127 | * else CC if end-of-file, and |
128 | * R0 corrupted |
129 | * May return an error |
130 | * |
131 | * Use: Reads a byte from the current input. |
132 | */ |
133 | |
134 | extern routine xload_byte; |
135 | |
136 | /* --- xload_word --- * |
137 | * |
138 | * On entry: -- |
139 | * |
140 | * On exit: CC if data read OK, and |
141 | * R0 == word read |
142 | * else CS if end-of-file and |
143 | * R0 corrupted |
144 | * May return an error |
145 | * |
146 | * Use: Reads a word from the current input. |
147 | */ |
148 | |
149 | extern routine xload_word; |
150 | |
151 | /* --- xload_block --- * |
152 | * |
153 | * On entry: R0 == pointer to buffer to read |
154 | * R1 == size of buffer to read |
155 | * |
156 | * On exit: R0, R1 preserved |
157 | * R2 == number of bytes read |
158 | * CC if more data available, CS for end-of-file |
159 | * May return an error |
160 | * |
161 | * Use: Reads in a block of data. Data is buffered, so this is |
162 | * fairly quick for reading small objects. Large data blocks |
163 | * are read directly to avoid buffering overhead. |
164 | */ |
165 | |
166 | extern routine xload_block; |
167 | |
168 | /*----- That's all, folks -------------------------------------------------*/ |
169 | |
170 | #endif |