	.TITLE	EXPR
	.PROC	M680002

	.REF	SM8
	.REF	DRIVERS
	.REF	LIB
	.REF	MATH64


LBNUM	=	LGCHUS64




	.LOC	0
OCHMATH:.BLKB	2
OBNUM1:	.BLKB	LBNUM
OBNUM2:	.BLKB	LBNUM
OBNUMR:	.BLKB	LBNUM+10
LGVAR:



	.LOC	0
START:
	LOAD.L	A6,#R16"VAR

	LOAD.L	A3,#R16"NMMATH
	LOAD.W	D3,#MATH64_FIRST
	.W	LIB_OPEN
	JUMP,NE ERROR
	LOAD.W	(A6)+OCHMATH,D1

	LOAD.L	D0,#2^BM64C7D	; D0 <-- mode par dfaut
	.W	MATH64_OPEN
	JUMP,NE ERROR

LOOP:
	LIB	?AFTIM
	.ASCIZ	"Premier nombre = "
	.EVEN
	LOAD.L	A3,#(A6)+OBNUM1
	LOAD.W	D3,#LBNUM
	LIB	?GETLINE
	COMP.W	D3,#END
	JUMP,EQ FIN

	LOAD.L	A3,#(A6)+OBNUM1
	.W	MATH64_ASC_FP


	LIB	?AFTIM
	.ASCIZ	"Rsultat = "
	.EVEN
	LOAD.L	A3,#(A6)+OBNUM1
	CLR.L	D0
	LOAD.B	D0,#-2
	SWAP.W	D0
	LOAD.B	D0,#10

;	TSET.L	D0:#BM64UNIT
;	TSET.L	D0:#BM64LOG
;	TSET.L	D0:#BM64DEF
;	TSET.L	D0:#BM64COMM
;	TSET.L	D0:#BM64AVDER
;	TSET.L	D0:#BM64AVAVDER
;	TSET.L	D0:#BM64CDRT
;	TSET.L	D0:#BM64CGAU
;	TSET.L	D0:#BM64SPG
;	TSET.L	D0:#BM64POW
;	TSET.L	D0:#BM64FCOMM
;	TSET.L	D0:#BM64SEPE
;	TSET.L	D0:#BM64SEPF

	.W	MATH64_FP_ASC

	LIB	?AFTEXT
	LIB	?AFCR
	LIB	?AFCR
	JUMP	LOOP


ERROR:
	LIB	?AFERROR
FIN:
	.W	MATH64_CLOSE
	LOAD.W	D1,(A6)+OCHMATH
	.W	LIB_CLOSE
	EXIT










NMMATH:	.ASCIZ	"MATH64"
	.EVEN

VAR:	.FILLB	LGVAR,0


	.END	START
