summaryrefslogtreecommitdiffstats
path: root/fxn.asm
blob: f49bdd7e630297e254838fbcbcc1378bd57483e7 (plain)
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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
/* -*- asm -*- ----------------------------------------------------------- *
 *   
 *   Copyright 2013 H. Peter Anvin - All Rights Reserved
 *
 *   Permission is hereby granted, free of charge, to any person
 *   obtaining a copy of this software and associated documentation
 *   files (the "Software"), to deal in the Software without
 *   restriction, including without limitation the rights to use,
 *   copy, modify, merge, publish, distribute, sublicense, and/or
 *   sell copies of the Software, and to permit persons to whom
 *   the Software is furnished to do so, subject to the following
 *   conditions:
 *   
 *   The above copyright notice and this permission notice shall
 *   be included in all copies or substantial portions of the Software.
 *   
 *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 *   OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 *   NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 *   HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 *   WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 *   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 *   OTHER DEALINGS IN THE SOFTWARE.
 *
 * ----------------------------------------------------------------------- */

#include "v9fs.h"

	.code16
	.section ".rtext","ax"

/* ------------------------------------------------------------------------- *
 *  fxn_chdir
 * ------------------------------------------------------------------------- */

GPROC(fxn_chdir)
#ifdef DEBUG
	debugmsg "chdir fn1 = "
	lfsw dos_sdafn,%si
	pushw %fs
	pushw %si
	call debug_puts_far
	call debug_crlf
#endif
	movl $FID_CHDIR,%eax
	incw %si		/* Skip drive letter */
	incw %si		/* Skip colon */
	call path_walk_asciiz
	jc 1f
	pushw %ax
	movl $FID_CHDIR,%eax
	call clunk
	popw %ax
#ifdef DEBUG
	debugmsg "type "
	pushw %ax
	call debug_printhex4
	call debug_crlf
#endif
	andb %al,%al		/* Bit 7 = P9_QTDIR */
	jns 1f
	xorw %ax,%ax
	retw
1:
	movl $0x08030003,%eax	/* Path not found */
	clc
	retw
END(fxn_chdir)

/* ------------------------------------------------------------------------- *
 *  fxn_closefile
 * ------------------------------------------------------------------------- */

GPROC(fxn_closefile)
	stc
	retw
END(fxn_closefile)

/* ------------------------------------------------------------------------- *
 *  fxn_commitfile
 * ------------------------------------------------------------------------- */

GPROC(fxn_commitfile)
	stc
	retw
END(fxn_commitfile)

/* ------------------------------------------------------------------------- *
 *  fxn_delete
 * ------------------------------------------------------------------------- */

GPROC(fxn_delete)
	stc
	retw
END(fxn_delete)

/* ------------------------------------------------------------------------- *
 *  fxn_getattr
 * ------------------------------------------------------------------------- */

GPROC(fxn_getattr)
	stc
	retw
END(fxn_getattr)

/* ------------------------------------------------------------------------- *
 *  fxn_inquiry
 *
 *  Indicate that a redirector is present, but that more can be installed.
 * ------------------------------------------------------------------------- */

GPROC(fxn_inquiry)
	movb $0xff,F_AL		/* Redirector installed, OK to install more */
	xorw %ax,%ax		/* No error (AX=0), no chain (CF=0) */
	retw
END(fxn_inquiry)

/* ------------------------------------------------------------------------- *
 *  fxn_lockfile
 * ------------------------------------------------------------------------- */

GPROC(fxn_lockfile)
	stc
	retw
END(fxn_lockfile)

/* ------------------------------------------------------------------------- *
 *  fxn_mkdir
 * ------------------------------------------------------------------------- */

GPROC(fxn_mkdir)
	stc
	retw
END(fxn_mkdir)

/* ------------------------------------------------------------------------- *
 *  fxn_readfile
 * ------------------------------------------------------------------------- */

GPROC(fxn_readfile)
	stc
	retw
END(fxn_readfile)

/* ------------------------------------------------------------------------- *
 *  fxn_rename
 * ------------------------------------------------------------------------- */

GPROC(fxn_rename)
	stc
	retw
END(fxn_rename)

/* ------------------------------------------------------------------------- *
 *  fxn_rmdir
 * ------------------------------------------------------------------------- */

GPROC(fxn_rmdir)
	stc
	retw
END(fxn_rmdir)

/* ------------------------------------------------------------------------- *
 *  fxn_setattr
 * ------------------------------------------------------------------------- */

GPROC(fxn_setattr)
	stc
	retw
END(fxn_setattr)

/* ------------------------------------------------------------------------- *
 *  fxn_skfmend
 * ------------------------------------------------------------------------- */

GPROC(fxn_skfmend)
	stc
	retw
END(fxn_skfmend)

/* ------------------------------------------------------------------------- *
 *  fxn_unknown_2d
 * ------------------------------------------------------------------------- */

GPROC(fxn_unknown_2d)
	movw $2,F_AX		/* This is what MSCDEX returns */
	xorw %ax,%ax		/* No error (AX=0), no chain (CF=0) */
	retw
END(fxn_unknown_2d)

/* ------------------------------------------------------------------------- *
 *  fxn_unlockfile
 * ------------------------------------------------------------------------- */

GPROC(fxn_unlockfile)
	stc
	retw
END(fxn_unlockfile)

/* ------------------------------------------------------------------------- *
 *  fxn_writefile
 * ------------------------------------------------------------------------- */

GPROC(fxn_writefile)
	stc
	retw
END(fxn_writefile)

/* ------------------------------------------------------------------------- *
 *  fxn_qualify
 *
 *  Qualify a pathname.  Just return failure and let DOS do the default.
 * ------------------------------------------------------------------------- */

GPROC(fxn_qualify)
	movl $0x06060001,%eax
	clc
	retw
END(fxn_qualify)