	SECTION _TEXT CLASS=CODE USE32
	SECTION _DATA CLASS=DATA USE32
	SECTION _BSS  CLASS=BSS USE32
	SECTION _CONST  CLASS=CONST USE32
	SECTION _STRING  CLASS=STRING USE32
	SECTION cstartup CLASS=INITDATA USE32
	SECTION crundown CLASS=EXITDATA USE32
	SECTION cppinit  CLASS=CPPINIT USE32
	SECTION cppexit  CLASS=CPPEXIT USE32
	GROUP DGROUP _DATA _BSS _CONST _STRING

SECTION _TEXT
[GLOBAL	__getdrive]
;
; Line 5:	{
;
__getdrive:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 04H
;
; Line 7:		_dos_getdrive(&drive);
;
	LEA	EAX,[EBP+0FFFFFFFCH]
	PUSH	EAX
	CALL	__dos_getdrive
	POP	ECX
;
; Line 8:		return drive;
;
	MOV	EAX,DWORD [EBP+0FFFFFFFCH]
L_1:
	MOV	ESP,EBP
	POP	EBP
	RET
[GLOBAL	__chdrive]
;
; Line 11:	{
;
__chdrive:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 04H
	PUSH	EBX
;
; Line 12:		int rv = _getdrive();
;
	CALL	__getdrive
	MOV	EBX,EAX
;
; Line 14:		_dos_setdrive(__drive,&nd);
;
	LEA	EAX,[EBP+0FFFFFFFCH]
	PUSH	EAX
	PUSH	DWORD [EBP+08H]
	CALL	__dos_setdrive
	ADD	ESP,BYTE 08H
;
; Line 15:		return rv;
;
	MOV	EAX,EBX
L_2:
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
[GLOBAL	__getdcwd]
;
; Line 18:	{
;
__getdcwd:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,0100H
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+0CH]
	MOV	EDI,DWORD [EBP+010H]
;
; Line 20:		_dos_getpwd(tbuf,__drive);
;
	PUSH	DWORD [EBP+08H]
	LEA	EAX,[EBP+0FFFFFF00H]
	PUSH	EAX
	CALL	__dos_getpwd
	ADD	ESP,BYTE 08H
;
; Line 21:		memcpy(__buf,tbuf,__len);
;
	PUSH	EDI
	LEA	EAX,[EBP+0FFFFFF00H]
	PUSH	EAX
	PUSH	ESI
	CALL	_memcpy
	ADD	ESP,BYTE 0CH
;
; Line 22:		__buf[__len-1]=0;
;
	MOV	BYTE [ESI+EDI+0FFFFFFFFH+00H],00H
;
; Line 23:		return __buf ;
;
	MOV	EAX,ESI
L_3:
	POP	EDI
	POP	ESI
	MOV	ESP,EBP
	POP	EBP
	RET


SECTION _TEXT
[EXTERN	_memcpy]
[EXTERN	__dos_getdrive]
[EXTERN	__dos_getpwd]
[EXTERN	__dos_setdrive]
