summaryrefslogtreecommitdiffstats
path: root/fxn.asm
diff options
context:
space:
mode:
Diffstat (limited to 'fxn.asm')
-rw-r--r--fxn.asm31
1 files changed, 30 insertions, 1 deletions
diff --git a/fxn.asm b/fxn.asm
index 9f2f94a..adcd5d9 100644
--- a/fxn.asm
+++ b/fxn.asm
@@ -35,7 +35,36 @@
* ------------------------------------------------------------------------- */
GPROC(fxn_chdir)
- stc
+#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
+ 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)