Initial revision
[ssr] / StraySrc / Libraries / Sapphire / csapph / h / xfer / load
CommitLineData
2ee739cc 1/*
2 * load.h
3 *
4 * [Generated from load, 08 November 1995]
5 */
6
7#pragma include_only_once
8#pragma force_top_level
9
10#ifndef __load_h
11#define __load_h
12
13/*----- Overview ----------------------------------------------------------*
14 *
15 * Functions provided:
16 *
17 * load
18 * load_initBuf
19 * load_killBuf
20 * load_extendBuf
21 * load_doneBuf
22 * load_file
23 */
24
25/* --- load --- *
26 *
27 * On entry: R0 == pointer to entry point block
28 * R1 == value of R10 to pass to entry points
29 * R2 == value of R12 to pass to entry points
30 *
31 * On exit: --
32 *
33 * Use: Attempts to load a file after receipt of a Message_DataSave,
34 * Message_DataLoad or Message_DataOpen. If user entries for
35 * RAM transfer are provided, this is attempted, although the
36 * entries must also be aware that file transfer may be
37 * required.
38 */
39
40extern routine load;
41
42/* --- load_initBuf --- *
43 *
44 * On entry: R1 == estimated file size
45 * R2 == pointer to flex anchor (unallocated)
46 *
47 * On exit: R0 == pointer to buffer start
48 * R1 == buffer size
49 * May return an error
50 *
51 * Use: Initialises a flex block for use as a RAM transfer buffer.
52 * This routine is suitable for use as the initBuf routine for
53 * RAM transfer loading.
54 */
55
56extern routine load_initBuf;
57
58/* --- load_killBuf --- *
59 *
60 * On entry: R2 == pointer to flex anchor
61 *
62 * On exit: --
63 *
64 * Use: Frees a flex block. This routine should be used to free
65 * the buffer used for RAM transfer.
66 */
67
68extern routine load_killBuf;
69
70/* --- load_extendBuf --- *
71 *
72 * On entry: R0 == pointer to previous buffer
73 * R1 == size of previous buffer
74 * R2 == pointer to flex anchor
75 *
76 * On exit: R0 == pointer to a new buffer
77 * R1 == size of the new buffer
78 * May return an error
79 *
80 * Use: Extends the flex block if it was initially too small.
81 * This routine is designed to be used as the extend routine
82 * during RAM transfer.
83 */
84
85extern routine load_extendBuf;
86
87/* --- load_doneBuf --- *
88 *
89 * On entry: R1 == actual size of data
90 * R2 == pointer to flex anchor
91 *
92 * On exit: --
93 *
94 * Use: Sets the block into which the data has been loaded to the
95 * correct exact size.
96 */
97
98extern routine load_doneBuf;
99
100/* --- load_file --- *
101 *
102 * On entry: R1 == pointer to filename to load
103 * R2 == pointer to flex anchor
104 *
105 * On exit: R0 == size of file loaded
106 * May return an error
107 *
108 * Use: Loads a named file into a flex block for your delectation.
109 */
110
111extern routine load_file;
112
113/*----- User entry points -------------------------------------------------*/
114
115#define lEntry__initBuf 0
116
117#define lEntry__killBuf 4
118
119#define lEntry__extend 8
120
121#define lEntry__doneBuf 12
122
123#define lEntry__file 16
124
125#define lEntry__done 20
126
127#define lEntry__failed 24
128
129/*----- That's all, folks -------------------------------------------------*/
130
131#endif