	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
;
; Line 15:	{
;
_raise16:
;
; Line 16:		__clearxcept();
;
	CALL	___clearxcept
;
; Line 17:			asm mov esp,[_stacktop]
;
	MOV	ESP,DWORD [__stacktop]
;
; Line 18:	  asm sti
;
	STI
;
; Line 19:			fprintf((_pstreams[2]),"\nFloating point exception");
;
	PUSH	DWORD L_1
	PUSH	DWORD [08H+__pstreams]
	CALL	_fprintf
	ADD	ESP,BYTE 08H
;
; Line 20:			exit(1);
;
	PUSH	BYTE 01H
	CALL	_exit
	POP	ECX
;
; Line 21:	}
;
	RET
;
; Line 23:	{
;
_raise7:
;
; Line 24:		__clearxcept();
;
	CALL	___clearxcept
;
; Line 25:			asm mov esp,[_stacktop]
;
	MOV	ESP,DWORD [__stacktop]
;
; Line 26:	  	asm sti
;
	STI
;
; Line 27:			fprintf((_pstreams[2]),"\nFloating point emulation not supported under DOS");
;
	PUSH	DWORD L_2
	PUSH	DWORD [08H+__pstreams]
	CALL	_fprintf
	ADD	ESP,BYTE 08H
;
; Line 28:			exit(1);
;
	PUSH	BYTE 01H
	CALL	_exit
	POP	ECX
;
; Line 29:	}
;
	RET
;
; Line 31:	{
;
_llfpini:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 04H
;
; Line 34:		work = 0x4567;
;
	MOV	WORD [EBP+0FFFFFFFEH],04567H
;
; Line 36:	  asm fninit
;
	FNINIT
;
; Line 37:	  asm fnstsw [work]	
;
	FNSTSW	WORD [EBP+0FFFFFFFEH]
;
; Line 38:		if (work == 0) {
;
	MOVSX	EAX,WORD [EBP+0FFFFFFFEH]
	TEST	EAX,EAX
	JNE	NEAR	L_3
;
; Line 40:			asm fninit
;
	FNINIT
;
; Line 41:	    asm fwait
;
	WAIT
;
; Line 42:			asm fstcw [work]
;
	FSTCW	WORD [EBP+0FFFFFFFEH]
;
; Line 43:			work &= 0xffbb;
;
	AND	WORD [EBP+0FFFFFFFEH],0FFBBH
;
; Line 44:			asm fldcw [work]
;
	FLDCW	WORD [EBP+0FFFFFFFEH]
;
; Line 45:			hasfloat++;
;
	INC	DWORD [_hasfloat]
;
; Line 46:			__setxcept(16,raise16);
;
	PUSH	DWORD _raise16
	PUSH	BYTE 010H
	CALL	___setxcept
	ADD	ESP,BYTE 08H
;
; Line 47:		}
;
	JMP	L_4
L_3:
;
; Line 50:			__setxcept(7,raise7);
;
	PUSH	DWORD _raise7
	PUSH	BYTE 07H
	CALL	___setxcept
	ADD	ESP,BYTE 08H
;
; Line 51:		}
;
L_4:
;
; Line 52:	}
;
	MOV	ESP,EBP
	POP	EBP
	RET

SECTION _STRING
L_2:
	DB	0AH,046H,06CH,06FH,061H,074H,069H,06EH,067H,020H,070H,06FH
	DB	069H,06EH,074H,020H,065H,06DH,075H,06CH,061H,074H,069H,06FH
	DB	06EH,020H,06EH,06FH,074H,020H,073H,075H,070H,070H,06FH,072H
	DB	074H,065H,064H,020H,075H,06EH,064H,065H,072H,020H,044H,04FH
	DB	053H,00H
L_1:
	DB	0AH,046H,06CH,06FH,061H,074H,069H,06EH,067H,020H,070H,06FH
	DB	069H,06EH,074H,020H,065H,078H,063H,065H,070H,074H,069H,06FH
	DB	06EH,00H
SECTION _DATA
SECTION _BSS

_oldcr0	RESB	04H
[GLOBAL	_hasfloat]

_hasfloat	RESB	04H
SECTION cstartup
	DD	_llfpini,149

SECTION _TEXT
[EXTERN	_fprintf]
[EXTERN	_exit]
[EXTERN	___clearxcept]
[EXTERN	___setxcept]

SECTION _DATA
[EXTERN	__stacktop]
[EXTERN	__pstreams]
