summaryrefslogtreecommitdiffstats
path: root/src/doc/pxe_extensions
blob: 0d04fcdc4bf96a628920ee1ccff958b3b4f65707 (plain) (blame)
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
FILE OPEN

Op-Code:	PXENV_FILE_OPEN (00e0h)

Input:		Far pointer to a t_PXENV_FILE_OPEN parameter structure
		that has been initialised by the caller.

Output:		PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be
		returned in AX.  The status field in the parameter
		structure must be set to one of the values represented
		by the PXENV_STATUS_xxx constants.

Description:	Opens a file specified by a URL for reading.  Multiple
		files may be opened and used concurrently.


typedef struct s_PXENV_FILE_OPEN {
	PXENV_STATUS Status;
	UINT16 FileHandle;
	SEGOFF16 FileName;
	UINT32 Reserved;
} t_PXENV_FILE_OPEN;


Set before calling API service:

FileName:	URL of file to be opened.  Null terminated.

Reserved:	Must be zero.


Returned from API service:

FileHandle:	Handle for use in subsequent PXE FILE API calls.

Status:		See PXENV_STATUS_xxx constants.




FILE CLOSE

Op-Code:	PXENV_FILE_CLOSE (00e1h)

Input:		Far pointer to a t_PXENV_FILE_CLOSE parameter structure
		that has been initialised by the caller.

Output:		PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be
		returned in AX.  The status field in the parameter
		structure must be set to one of the values represented
		by the PXENV_STATUS_xxx constants.

Description:	Closes a previously opened file.


typedef struct s_PXENV_FILE_CLOSE {
	PXENV_STATUS Status;
	UINT16 FileHandle;
} t_PXENV_FILE_CLOSE;


Set before calling API service:

FileHandle:	Handle obtained when file was opened.


Returned from API service:

Status:		See PXENV_STATUS_xxx constants.




FILE SELECT

Op-Code:	PXENV_FILE_SELECT (00e2h)

Input:		Far pointer to a t_PXENV_FILE_SELECT parameter structure
		that has been initialised by the caller.

Output:		PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be
		returned in AX.  The status field in the parameter
		structure must be set to one of the values represented
		by the PXENV_STATUS_xxx constants.

Description:	Check a previously opened file's readiness for I/O.


typedef struct s_PXENV_FILE_SELECT {
	PXENV_STATUS Status;
	UINT16 FileHandle;
	UINT16 Ready;
#define RDY_READ 0x0001
} t_PXENV_FILE_SELECT;


Set before calling API service:

FileHandle:	Handle obtained when file was opened.


Returned from API service:

Ready:		Indication of readiness.  This can be zero, or more,
		of the RDY_xxx constants.  Multiple values are
		arithmetically or-ed together.

Status:		See PXENV_STATUS_xxx constants.




FILE READ

Op-Code:	PXENV_FILE_READ (00e3h)

Input:		Far pointer to a t_PXENV_FILE_READ parameter structure
		that has been initialised by the caller.

Output:		PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be
		returned in AX.  The status field in the parameter
		structure must be set to one of the values represented
		by the PXENV_STATUS_xxx constants.

		This API function is non-blocking.  PXENV_EXIT_SUCCESS
		and PXENV_STATUS_SUCCESS is returned if a data block
		has been transferred into the caller's buffer.
		PXENV_EXIT_FAILURE and PXENV_STATUS_FAILURE is
		returned if no data is available to transfer.

Description:	Read from a previously opened file.


typedef struct s_PXENV_FILE_READ {
	PXENV_STATUS Status;
	UINT16 FileHandle;
	UINT16 BufferSize;
	SEGOFF16 Buffer;
} t_PXENV_FILE_READ;


Set before calling API service:

FileHandle:	Handle obtained when file was opened.

BufferSize:	Maximum number of data bytes that can be copied into
		Buffer.

Buffer:		Segment:Offset address of data buffer.


Returned from API service:

BufferSize:	Number of bytes written to the data buffer.  End of
		file if this is zero.

Status:		See PXENV_STATUS_xxx constants.




GET FILE SIZE

Op-Code:	PXENV_GET_FILE_SIZE (00e4h)

Input:		Far pointer to a t_PXENV_GET_FILE_SIZE parameter
		structure that has been initialised by the caller.

Output:		PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be
		returned in AX.  The status field in the parameter
		structure must be set to one of the values represented
		by the PXENV_STATUS_xxx constants.

Description:	Determine size of a previously opened file.


typedef struct s_PXENV_GET_FILE_SIZE {
	PXENV_STATUS Status;
	UINT16 FileHandle;
	UINT32 FileSize;
} t_PXENV_GET_FILE_SIZE;


Set before calling API service:

FileHandle:	Handle obtained when file was opened.


Returned from API service:

FileSize:	Size of the file in bytes.

Status:		See PXENV_STATUS_xxx constants.