	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	_system]
;
; Line 10:	{
;
_system:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 064H
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	LEA	ESI,[EBP+0FFFFFF9CH]
;
; Line 13:		a = getenv("COMSPEC");
;
	PUSH	DWORD L_1
	CALL	_getenv
	POP	ECX
	MOV	EBX,EAX
;
; Line 14:		if (!string) {
;
	CMP	DWORD [EBP+08H],BYTE 00H
	JNE	NEAR	L_3
;
; Line 15:			if (!a)
;
	TEST	EBX,EBX
	JNE	SHORT	L_5
;
; Line 16:				return 0;
;
	MOV	EAX,00H
	JMP	L_7
L_5:
;
; Line 18:				if (f = fopen(a,"r")) {
;
	PUSH	DWORD L_2
	PUSH	EBX
	CALL	_fopen
	ADD	ESP,BYTE 08H
	MOV	EDI,EAX
	TEST	EAX,EAX
	JE	SHORT	L_8
;
; Line 19:					fclose(f);
;
	PUSH	EDI
	CALL	_fclose
	POP	ECX
;
; Line 20:					return 1;
;
	MOV	EAX,01H
	JMP	L_7
L_8:
;
; Line 23:					return 0;
;
	MOV	EAX,00H
	JMP	L_7
L_9:
L_6:
;
; Line 24:		}
;
L_3:
;
; Line 25:		if (!a) {
;
	TEST	EBX,EBX
	JNE	SHORT	L_10
;
; Line 26:			errno = 2       ;
;
	MOV	DWORD [_errno],02H
;
; Line 27:			return -1;
;
	MOV	EAX,0FFFFFFFFH
	JMP	L_7
L_10:
;
; Line 29:		buf[0] = ' ';
;
	MOV	BYTE [ESI+00H],020H
;
; Line 30:		buf[1] = '-';
;
	MOV	BYTE [ESI+01H],02DH
;
; Line 31:		buf[2] = 'C';
;
	MOV	BYTE [ESI+02H],043H
;
; Line 32:		strcpy(buf+3,string);
;
	LEA	EAX,[ESI+00H]
	ADD	EAX,BYTE 03H
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
	MOV	EDI,EAX
	XCHG	ESI,EDI
	CLD
	PUSH	EDI
	SUB	EAX,EAX
	MOV	ECX,0FFFFFFFFH
	REPNZ	SCASB
	NOT	ECX
	MOV	EAX,ECX
	POP	EDI
	XCHG	ESI,EDI
	REPNZ	MOVSB
	POP	EDI
	POP	ESI
	LEA	ECX,[ESI+00H]
	ADD	ECX,BYTE 03H
;
; Line 33:		spawnlp(0,a,a,buf,0);
;
	PUSH	BYTE 00H
	PUSH	ESI
	PUSH	EBX
	PUSH	EBX
	PUSH	BYTE 00H
	CALL	_spawnlp
	ADD	ESP,BYTE 014H
;
; Line 34:		return 0;
;
	MOV	EAX,00H
L_7:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET

SECTION _STRING
L_2:
	DB	072H,00H
L_1:
	DB	043H,04FH,04DH,053H,050H,045H,043H,00H

SECTION _TEXT
[EXTERN	_fopen]
[EXTERN	_getenv]
[EXTERN	_fclose]
[EXTERN	_spawnlp]

SECTION _DATA
[EXTERN	_errno]
