 EXTERN HeapPtr,FramePointer,&INTTOSINGLE,INTTOSINGLE,&INT,INT,&ROUND,ROUND
 EXTERN &TRUNC,TRUNC,&SPLITSINGLE,SPLITSINGLE,&GETANDRESETEXP,GETANDRESETEXP
 EXTERN &SETEXP,SETEXP,&ROUNDSTR,ROUNDSTR,__ldldR2345,__bytegreater,__PushLintData
 EXTERN __multSingle,__AddSingle,__Singleless,__NotSingle,__Singlegreater
 EXTERN __divSingle,__PushLintLiteral,__subSingle,__SubWords,__AddWordsIndirect
 EXTERN __AnlWords,__Intgreater,__SingleABS,__lintequ,__Singlelessorequ
 EXTERN __shr16,__byteless,__Dec16Data,__pushIString,__AddCharToString,__popIString
 EXTERN __byteequ,__Inc16Data,__ConstSet,__UpCase,__smult16reg,__AddWords
 EXTERN __NotInt,__Intless,__ldlcR2345,__pushCString,__MoveStringCtoD,__intABS
 EXTERN __DDInsert,__AddStringToChar,__AddStrings,__POSN,__and32,__lintnotequ
 EXTERN __bytezero,__IntToStr,__mult32,__Add32,__mod32,INTTOSINGLE|A,RESULT
 EXTERN INT|A,ROUND|A,TRUNC|A,SPLITSINGLE|VALUE,SPLITSINGLE|EXP,GETANDRESETEXP|A
 EXTERN GETANDRESETEXP|B,SETEXP|A,SETEXP|B,ROUNDSTR|S,ROUNDSTR|D

 GLOBAL &FPHLIB,&SIN,SIN,&COS,COS,&TAN,TAN,&ARCTAN
 GLOBAL ARCTAN,&SQR,SQR,&SQRT,SQRT,&LN,LN,&LOG10
 GLOBAL LOG10,&EXP,EXP,&POWER,POWER,&FRAC,FRAC,&ARCSIN
 GLOBAL ARCSIN,&ARCCOS,ARCCOS,&SINH,SINH,&COSH,COSH,&TANH
 GLOBAL TANH,&STRTOSINGLE,STRTOSINGLE,&SINGLETOSTR,SINGLETOSTR,&SINGLETOSCIENTIFIC
 GLOBAL SINGLETOSCIENTIFIC,&RANDOM,RANDOM,SIN|F,SIN|RESULT,COS|F,COS|RESULT
 GLOBAL TAN|F,TAN|RESULT,ARCTAN|F,ARCTAN|RESULT,SQR|F,SQR|RESULT,SQRT|F
 GLOBAL SQRT|RESULT,LN|F,LN|RESULT,LOG10|F,LOG10|RESULT,EXP|F,EXP|RESULT
 GLOBAL POWER|X,POWER|Y,POWER|RESULT,FRAC|X,FRAC|RESULT,ARCSIN|F,ARCSIN|RESULT
 GLOBAL ARCCOS|F,ARCCOS|RESULT,SINH|F,SINH|RESULT,COSH|F,COSH|RESULT,TANH|F
 GLOBAL TANH|RESULT,STRTOSINGLE|INPUT,STRTOSINGLE|RESULT,SINGLETOSTR|V,SINGLETOSTR|W
 GLOBAL SINGLETOSTR|D,SINGLETOSTR|RESULT,SINGLETOSCIENTIFIC|V,SINGLETOSCIENTIFIC|RESULT
 GLOBAL RANDOM|RANGE,RANDOM|RESULT,RANDSEED

;{Embedded Pascal floating point package for the AVR}
;{High level math functions and conversion routines}
;{This also serves as example as to how to create libraries
;in high level Pascal}
	CODE
	File 'D:\Program Files\Borland\Delphi 3\projects\AVRPas2\Lib\FPHLib.pas'
;unit FPHLib;
;interface
	library INTLIB
	library FPSLIB
;Unit Interface file D:\Program Files\Borland\Delphi 3\projects\805X\lib\FPSLIB.EPI
	File 'D:\Program Files\Borland\Delphi 3\projects\805X\lib\FPSLIB.EPI'
;{
;Embedded Pascal 805x
;Import library for basic FP math functions
;To use these functions you must link the file
;FPSLib.RRC
;Use this file as include file in all Pascal
;sources where you need any of these functions
;}
;{#K-}
;{#D Data} //the following routines are static with 
;          //parameters and results in data space 
;function IntToSingle(a: Longint): Single; External;
;function Int(a: Single): Single; External;
;function Round(a: Single): Longint; External;
;function Trunc(a: Single): Longint; External;
;{#K PREV}
; End of include file FPSLIB.EPI
	File 'D:\Program Files\Borland\Delphi 3\projects\AVRPas2\Lib\FPHLib.pas'
;type
;  String15= String[15];
;function SIN(f: Single): Single;
;function COS(f: Single): Single;
;function TAN(f: Single): Single;
;function ARCTAN(f: Single): Single;
;function SQR(f: Single): Single;
;function Sqrt(f: Single): Single;
;function Ln(f: Single): Single;
;function log10(f: Single): Single;
;function EXP(f: Single): Single;
;function POWER(x,y: Single): Single;
;function Frac(x: Single): Single;
;function ARCSIN(f: Single): Single;
;function ARCCOS(f: Single): Single;
;function SINH(f: Single): Single;
;function COSH(f: Single): Single;
;function TANH(f: Single): Single;
;function StrToSingle(input: string15): Single;
;function SingleToStr(v: Single; w,d: byte): string15;
;function SingleToScientific(v: Single): string15;
;function Random(Range: Longint): Longint;
;(*
;Note: if you do not need the Random function then remove the
;Randseed variable and the Random function code. This will save
;you 4 bytes of data space.
;*)
; 
;var
;  RandSeed: Longint;
;implementation
;type
;  TArrayOfSingle=array[0..20] of Single;
;  PTArrayOfSingle= ^TArrayOfSingle;
;  String20= String[20];
;{The following routines are exported from FPSLib.RRC}
;(*
;//Convert an integer to a single 
;function IntToSingle(a: Longint): Single; External;
;//Return integer portion of single value
;function Int(a: Single): Single; External;
;//Return integer portion of single value rounded to nearest integer as integer
;function Round(a: Single): Longint; External;
;//Return integer portion of single value truncated to lower integer as integer
;function Trunc(a: Single): Longint; External;
;*)
;//Take a single and return the mantissa as denormalized string with leading zeroes
;//suppressed. Return corrected exponent as integer in range -64 to +63
;function SplitSingle(value: Single; var exp: integer): String20; External;
;//Get the exponent of a value and reset it to 0 (biased to 64). Mantissa unchanged.
;function GetAndResetExp(A: Single; var B: Integer): Single; External;
;//Set the exponent of a value without changing the mantissa
;function SetExp(A: Single; B: Integer): Single; External; 
;//Round the ascii numeric represenation in "s" to "D" digits behind the decimal point
;function RoundStr(var s: string20; D: byte): boolean; External;
;var
;  {used by StrToSingle,SingleToStr,SingleToScientific,Do_Poly}
;  ASCIIShareArea: array[0..40] of byte;
;  MathShareArea: array[0..16] of byte;
;  Math2ShareArea,Math3ShareArea: array[0..7] of byte;
;{#S ASCIIShareArea}
 IfRef @Do_Poly
;{#P IfRef @Do_Poly}
;function Do_Poly(x: Single; d: PTArrayOfSingle; n: byte): Single;
;var
;  res: Single;
	RegUse &DO_POLY
&DO_POLY:
;begin
;  {#X CODE} //The following pointers point to code
	line 88
	call &&S0
	RegAdd ##,&&S0
	call __ldldR2345
	RegAdd ##,#__ldldR2345
	mov DO_POLY|RES,R2
	mov DO_POLY|RES+1,R3
	mov DO_POLY|RES+2,R4
	mov DO_POLY|RES+3,R5
;  res:=d^[n];
&&30:
	line 89
	mov R2,#000H
	mov A,DO_POLY|N
	clr C
	subb A,R2
	.jmpz &&31
	.jmpc &&31
;  while n>0 do
;  begin
	line 91
	mov R0,#DO_POLY|N+0
	dec @R0
;    dec(n);
	line 92
	mov R2,DO_POLY|RES
	mov R3,DO_POLY|RES+1
	mov R4,DO_POLY|RES+2
	mov R5,DO_POLY|RES+3
	mov R0,#DO_POLY|X
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __multSingle
	RegAdd ##,#__multSingle
	call &&S0
	RegAdd ##,&&S0
	call __ldldR2345
	RegAdd ##,#__ldldR2345
	call __AddSingle
	RegAdd ##,#__AddSingle
	pop DO_POLY|RES+3
	pop DO_POLY|RES+2
	pop DO_POLY|RES+1
	pop DO_POLY|RES
;    res:=x * res + d^[n];
	jmp &&30
&&31:
;  end;
	line 94
	mov DO_POLY,DO_POLY|RES
	mov DO_POLY+1,DO_POLY|RES+1
	mov DO_POLY+2,DO_POLY|RES+2
	mov DO_POLY+3,DO_POLY|RES+3
;  Do_Poly:=res;
;  {#X PREV} //Set back to previous setting
&&29:
	mov R0,#DO_POLY
	call __ldldR2345
	RegAdd ##,#__ldldR2345
	ret

	RegEnd ;&DO_POLY
;end;
 Endif
;{#P Endif}
;{#S-}
 IfRef @SIN
;{#P IfRef @SIN}
;function SIN(f: Single): Single;
;const
SIN|CF1:
;  cf1: array[0..4] of Single =
	DL 58CF3258H
	DL D796D878H
	DL 53D6E4E2H
	DL CED85D17H
	DL 4891F806H
;  (0.1357884e8,-0.49429081e7,0.440103053e6,-0.138472724e5,0.145968841e3);
SIN|CF2:
;  cf2: array[0..4] of Single =
	DL 5883E7CFH
	DL 53C74E67H
	DL 4E93DC62H
	DL 4884A74BH
	DL 41800000H
;  (0.864455865e7,0.408179225e6,0.946309610e4,0.132653491e3,1.0);
;var
;  y,ysq: Single;
;  sect,e: integer;	
	RegUse #&SIN
&SIN:
;begin
	line 111
	mov R2,#000H
	mov R3,#000H
	mov R4,#000H
	mov R5,#000H
	mov R0,#SIN|F
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __Singleless
	RegAdd ##,#__Singleless
	.jmpz &&32
;  if f < 0.0 then
;  begin
	line 113
	mov R2,SIN|F
	mov R3,SIN|F+1
	mov R4,SIN|F+2
	mov R5,SIN|F+3
	call __NotSingle
	RegAdd ##,#__NotSingle
	mov SIN|F,R2
	mov SIN|F+1,R3
	mov SIN|F+2,R4
	mov SIN|F+3,R5
;    f:=-f;
	line 114
	mov SIN|SECT,#02H
	mov SIN|SECT+1,#00H
;    sect:=2;
	jmp &&33
&&32:
	line 115
	mov SIN|SECT,#00H
	mov SIN|SECT+1,#00H
&&33:
;  end else sect:=0;
	line 116
	mov R2,#083H
	mov R3,#0F9H
	mov R4,#0A2H
	mov R5,#040H
	mov R0,#SIN|F
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __multSingle
	RegAdd ##,#__multSingle
	pop SIN|F+3
	pop SIN|F+2
	pop SIN|F+1
	pop SIN|F
;  f:=f * 0.63661977237;
	line 117
	mov R2,#000H
	mov R3,#000H
	mov R4,#080H
	mov R5,#043H
	mov R0,#SIN|F
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __Singlegreater
	RegAdd ##,#__Singlegreater
	.jmpz &&34
	mov R2,#000H
	mov R3,#000H
	mov R4,#080H
	mov R5,#043H
	mov R0,#SIN|F
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __divSingle
	RegAdd ##,#__divSingle
	pop INT|A+3
	pop INT|A+2
	pop INT|A+1
	pop INT|A
	RegAdd ##,#&INT
	call &INT
	call __PushLintLiteral
	RegAdd ##,#__PushLintLiteral
	DL 43800000H
	call __multSingle
	RegAdd ##,#__multSingle
	.Pop LA
	mov R0,#SIN|F
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __subSingle
	RegAdd ##,#__subSingle
	pop SIN|F+3
	pop SIN|F+2
	pop SIN|F+1
	pop SIN|F
&&34:
;  if f > 4.0 then f:=f - 4.0 * Int(f / 4.0);
	line 118
	mov R2,#000H
	mov R3,#000H
	mov R4,#080H
	mov R5,#042H
	mov R0,#SIN|F
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __Singlegreater
	RegAdd ##,#__Singlegreater
	.jmpz &&35
;  if f > 2.0 then 
;  begin
	line 120
	mov R2,#000H
	mov R3,#000H
	mov R4,#080H
	mov R5,#042H
	mov R0,#SIN|F
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __subSingle
	RegAdd ##,#__subSingle
	pop SIN|F+3
	pop SIN|F+2
	pop SIN|F+1
	pop SIN|F
;    f:=f-2.0;
	line 121
	mov R4,SIN|SECT
	mov R5,SIN|SECT+1
	mov R2,#002H
	mov R3,#000H
	call __SubWords
	RegAdd ##,#__SubWords
	mov SIN|SECT,R2
	mov SIN|SECT+1,R3
;    sect:=2-sect;
&&35:
;  end;
	line 123
	mov ROUND|A,SIN|F
	mov ROUND|A+1,SIN|F+1
	mov ROUND|A+2,SIN|F+2
	mov ROUND|A+3,SIN|F+3
	RegAdd ##,#&ROUND
	call &ROUND
	mov SIN|E,R2
	mov SIN|E+1,R3
;  e:=Round(f);
	line 124
	mov INTTOSINGLE|A,SIN|E
	mov INTTOSINGLE|A+1,SIN|E+1
	mov INTTOSINGLE|A+2,#0
	mov INTTOSINGLE|A+3,#0
	RegAdd ##,#&INTTOSINGLE
	call &INTTOSINGLE
	mov R0,#SIN|F
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __subSingle
	RegAdd ##,#__subSingle
	pop SIN|Y+3
	pop SIN|Y+2
	pop SIN|Y+1
	pop SIN|Y
;  y:=f-IntToSingle(e);
	line 125
	mov R0,#SIN|SECT
	mov R1,#SIN|E
	call __AddWordsIndirect
	RegAdd ##,#__AddWordsIndirect
	mov R5,3
	mov R4,2
	mov R2,#003H
	mov R3,#000H
	call __AnlWords
	RegAdd ##,#__AnlWords
	mov SIN|SECT,R2
	mov SIN|SECT+1,R3
;  sect:=(e + sect) and 3;
	line 126
	mov R2,#001H
	mov R3,#000H
	mov R4,SIN|SECT
	mov R5,SIN|SECT+1
	call __AnlWords
	RegAdd ##,#__AnlWords
	mov R4,#000H
	mov R5,#000H
	call __Intgreater
	RegAdd ##,#__Intgreater
	.jmpz &&36
	mov R2,SIN|Y
	mov R3,SIN|Y+1
	mov R4,SIN|Y+2
	mov R5,SIN|Y+3
	call __PushLintLiteral
	RegAdd ##,#__PushLintLiteral
	DL 41800000H
	call __subSingle
	RegAdd ##,#__subSingle
	pop SIN|Y+3
	pop SIN|Y+2
	pop SIN|Y+1
	pop SIN|Y
&&36:
;  if sect and 1>0 then y:=1.0-y;
	line 127
	mov R2,#002H
	mov R3,#000H
	mov R4,SIN|SECT
	mov R5,SIN|SECT+1
	call __AnlWords
	RegAdd ##,#__AnlWords
	mov R4,#000H
	mov R5,#000H
	call __Intgreater
	RegAdd ##,#__Intgreater
	.jmpz &&37
	mov R2,SIN|Y
	mov R3,SIN|Y+1
	mov R4,SIN|Y+2
	mov R5,SIN|Y+3
	call __NotSingle
	RegAdd ##,#__NotSingle
	mov SIN|Y,R2
	mov SIN|Y+1,R3
	mov SIN|Y+2,R4
	mov SIN|Y+3,R5
&&37:
;  if sect and 2>0 then y:=-y;
	line 128
	mov R2,SIN|Y
	mov R3,SIN|Y+1
	mov R4,SIN|Y+2
	mov R5,SIN|Y+3
	mov R0,#SIN|Y
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __multSingle
	RegAdd ##,#__multSingle
	pop SIN|YSQ+3
	pop SIN|YSQ+2
	pop SIN|YSQ+1
	pop SIN|YSQ
;  ysq:=y*y;
	line 129
	mov DO_POLY|X,SIN|YSQ
	mov DO_POLY|X+1,SIN|YSQ+1
	mov DO_POLY|X+2,SIN|YSQ+2
	mov DO_POLY|X+3,SIN|YSQ+3
	mov R2,#.lo(SIN|CF1+0)
	mov R3,#.hi(SIN|CF1+0)
	mov A,R2
	mov DO_POLY|D,A
	mov DO_POLY|N,#04H
	RegAdd ##,&DO_POLY
	call &DO_POLY
	mov R0,#SIN|Y
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __multSingle
	RegAdd ##,#__multSingle
	mov DO_POLY|X,SIN|YSQ
	mov DO_POLY|X+1,SIN|YSQ+1
	mov DO_POLY|X+2,SIN|YSQ+2
	mov DO_POLY|X+3,SIN|YSQ+3
	mov R2,#.lo(SIN|CF2+0)
	mov R3,#.hi(SIN|CF2+0)
	mov A,R2
	mov DO_POLY|D,A
	mov DO_POLY|N,#04H
	RegAdd ##,&DO_POLY
	call &DO_POLY
	call __divSingle
	RegAdd ##,#__divSingle
	pop SIN+3
	pop SIN+2
	pop SIN+1
	pop SIN
;  SIN:=y * Do_Poly(ysq,@cf1,4) / Do_Poly(ysq,@cf2,4);
&&5:
	mov R0,#SIN
	call __ldldR2345
	RegAdd ##,#__ldldR2345
	ret

	RegEnd ;#&SIN
;end;
 Endif
;{#P Endif}
 ifref @COS
;{#P ifref @COS}
;function COS(f: Single): Single; 
	RegUse #&COS
&COS:
;begin
	line 137
	mov R2,#0DBH
	mov R3,#00FH
	mov R4,#0C9H
	mov R5,#041H
	mov R0,#COS|F
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __AddSingle
	RegAdd ##,#__AddSingle
	pop SIN|F+3
	pop SIN|F+2
	pop SIN|F+1
	pop SIN|F
	RegAdd ##,#&SIN
	call &SIN
	mov COS,R2
	mov COS+1,R3
	mov COS+2,R4
	mov COS+3,R5
;  COS:=SIN(f + 1.570796326795);
&&6:
	mov R0,#COS
	call __ldldR2345
	RegAdd ##,#__ldldR2345
	ret

	RegEnd ;#&COS
;end;
 endif
;{#P endif}
 ifref @TAN
;{#P ifref @TAN}
;function TAN(f: Single): Single; 
	RegUse #&TAN
&TAN:
;begin
	line 144
	mov SIN|F,TAN|F
	mov SIN|F+1,TAN|F+1
	mov SIN|F+2,TAN|F+2
	mov SIN|F+3,TAN|F+3
	RegAdd ##,#&SIN
	call &SIN
	.push LA
	mov COS|F,TAN|F
	mov COS|F+1,TAN|F+1
	mov COS|F+2,TAN|F+2
	mov COS|F+3,TAN|F+3
	RegAdd ##,#&COS
	call &COS
	call __divSingle
	RegAdd ##,#__divSingle
	pop TAN+3
	pop TAN+2
	pop TAN+1
	pop TAN
;  TAN:=SIN(f)/COS(f);
&&7:
	mov R0,#TAN
	call __ldldR2345
	RegAdd ##,#__ldldR2345
	ret

	RegEnd ;#&TAN
;end;
 endif
;{#P endif}
;{#S MathShareArea}
 ifref @ARCTAN
;{#P ifref @ARCTAN}
;function ARCTAN(f: Single): Single; 
;const
ARCTAN|CF1:
;  cf1: array[0..5] of Single =
	DL 46843C06H
	DL 46EA9F7DH
	DL 4681902DH
;  (33.05861847399,58.655751569,32.3907948562,
	DL 43BB4D60H
	DL 3EC7EC51H
	DL B89F8DDEH
;   5.853195211263,0.1952374193623,-0.002434603300441);
ARCTAN|CF2:
;  cf2: array[0..4] of Single =
	DL 46843C06H
	DL 478B59C0H
	DL 46C40474H
;  (33.05861847399,69.67529105952,49.00434821822,
	DL 44CF9BF9H
	DL 41800000H
;   12.97557886271,1.0);
;var
;  rec: boolean;
;  val,valsq: Single;
	RegUse #&ARCTAN
&ARCTAN:
;begin
	line 162
	mov R2,ARCTAN|F
	mov R3,ARCTAN|F+1
	mov R4,ARCTAN|F+2
	mov R5,ARCTAN|F+3
	call __SingleABS
	RegAdd ##,#__SingleABS
	mov ARCTAN|VAL,R2
	mov ARCTAN|VAL+1,R3
	mov ARCTAN|VAL+2,R4
	mov ARCTAN|VAL+3,R5
;  val:=abs(f);
	line 163
	mov R2,#000H
	mov R3,#000H
	mov R4,#000H
	mov R5,#000H
	mov R0,#ARCTAN|VAL
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __lintequ
	RegAdd ##,#__lintequ
	.jmpz &&38
;  if val = 0.0 then
;  begin
	line 165
	mov ARCTAN,#00H
	mov ARCTAN+1,#00H
	mov ARCTAN+2,#00H
	mov ARCTAN+3,#00H
	jmp &&8
;    ARCTAN:=0.0; exit;
&&38:
;  end;
	line 167
	mov R2,#000H
	mov R3,#000H
	mov R4,#080H
	mov R5,#041H
	mov R0,#ARCTAN|VAL
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __Singlegreater
	RegAdd ##,#__Singlegreater
	mov ARCTAN|REC,A
;  rec:=val>1.0;
	line 168
	mov A,ARCTAN|REC
	.jmpz &&39
	mov R2,ARCTAN|VAL
	mov R3,ARCTAN|VAL+1
	mov R4,ARCTAN|VAL+2
	mov R5,ARCTAN|VAL+3
	call __PushLintLiteral
	RegAdd ##,#__PushLintLiteral
	DL 41800000H
	call __divSingle
	RegAdd ##,#__divSingle
	pop ARCTAN|VAL+3
	pop ARCTAN|VAL+2
	pop ARCTAN|VAL+1
	pop ARCTAN|VAL
&&39:
;  if rec then val:=1.0/val;
	line 169
	mov R2,ARCTAN|VAL
	mov R3,ARCTAN|VAL+1
	mov R4,ARCTAN|VAL+2
	mov R5,ARCTAN|VAL+3
	mov R0,#ARCTAN|VAL
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __multSingle
	RegAdd ##,#__multSingle
	pop ARCTAN|VALSQ+3
	pop ARCTAN|VALSQ+2
	pop ARCTAN|VALSQ+1
	pop ARCTAN|VALSQ
;  valsq:= val * val;
	line 170
	mov DO_POLY|X,ARCTAN|VALSQ
	mov DO_POLY|X+1,ARCTAN|VALSQ+1
	mov DO_POLY|X+2,ARCTAN|VALSQ+2
	mov DO_POLY|X+3,ARCTAN|VALSQ+3
	mov R2,#.lo(ARCTAN|CF1+0)
	mov R3,#.hi(ARCTAN|CF1+0)
	mov A,R2
	mov DO_POLY|D,A
	mov DO_POLY|N,#05H
	RegAdd ##,&DO_POLY
	call &DO_POLY
	mov R0,#ARCTAN|VAL
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __multSingle
	RegAdd ##,#__multSingle
	mov DO_POLY|X,ARCTAN|VALSQ
	mov DO_POLY|X+1,ARCTAN|VALSQ+1
	mov DO_POLY|X+2,ARCTAN|VALSQ+2
	mov DO_POLY|X+3,ARCTAN|VALSQ+3
	mov R2,#.lo(ARCTAN|CF2+0)
	mov R3,#.hi(ARCTAN|CF2+0)
	mov A,R2
	mov DO_POLY|D,A
	mov DO_POLY|N,#04H
	RegAdd ##,&DO_POLY
	call &DO_POLY
	call __divSingle
	RegAdd ##,#__divSingle
	pop ARCTAN|VAL+3
	pop ARCTAN|VAL+2
	pop ARCTAN|VAL+1
	pop ARCTAN|VAL
;  val:=val*Do_Poly(valsq,@cf1,5)/Do_Poly(valsq,@cf2,4);
	line 171
	mov A,ARCTAN|REC
	.jmpz &&40
	mov R2,ARCTAN|VAL
	mov R3,ARCTAN|VAL+1
	mov R4,ARCTAN|VAL+2
	mov R5,ARCTAN|VAL+3
	call __PushLintLiteral
	RegAdd ##,#__PushLintLiteral
	DL 41C90FDBH
	call __subSingle
	RegAdd ##,#__subSingle
	pop ARCTAN|VAL+3
	pop ARCTAN|VAL+2
	pop ARCTAN|VAL+1
	pop ARCTAN|VAL
&&40:
;  if rec then val:=1.570796326795-val;
	line 172
	mov R2,#000H
	mov R3,#000H
	mov R4,#000H
	mov R5,#000H
	mov R0,#ARCTAN|F
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __Singleless
	RegAdd ##,#__Singleless
	.jmpz &&41
	mov R2,ARCTAN|VAL
	mov R3,ARCTAN|VAL+1
	mov R4,ARCTAN|VAL+2
	mov R5,ARCTAN|VAL+3
	call __NotSingle
	RegAdd ##,#__NotSingle
	mov ARCTAN,R2
	mov ARCTAN+1,R3
	mov ARCTAN+2,R4
	mov ARCTAN+3,R5
	jmp &&42
&&41:
	mov ARCTAN,ARCTAN|VAL
	mov ARCTAN+1,ARCTAN|VAL+1
	mov ARCTAN+2,ARCTAN|VAL+2
	mov ARCTAN+3,ARCTAN|VAL+3
&&42:
;  if f<0.0 then ARCTAN:=-Val else ARCTAN:=val;
&&8:
	mov R0,#ARCTAN
	call __ldldR2345
	RegAdd ##,#__ldldR2345
	ret

	RegEnd ;#&ARCTAN
;end;
 endif
;{#P endif}
;{#S-}
;{#S MathShareArea}
 ifref @SQR
;{#P ifref @SQR}
;function SQR(f: Single): Single; 
	RegUse #&SQR
&SQR:
;begin
	line 181
	mov R2,SQR|F
	mov R3,SQR|F+1
	mov R4,SQR|F+2
	mov R5,SQR|F+3
	mov R0,#SQR|F
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __multSingle
	RegAdd ##,#__multSingle
	pop SQR+3
	pop SQR+2
	pop SQR+1
	pop SQR
;  SQR:=f*f;
&&9:
	mov R0,#SQR
	call __ldldR2345
	RegAdd ##,#__ldldR2345
	ret

	RegEnd ;#&SQR
;end;
 endif
;{#P endif}
;{#S-}
;{#S ASCIIShareArea}
 ifref @SQRT,@ARCSIN,@ARCCOS
;{#P ifref @SQRT,@ARCSIN,@ARCCOS}
;function Sqrt(f: Single): Single; 
;var
;  exp: integer;
;  n: byte;
;  v1,v2: Single;
	RegUse #&SQRT
&SQRT:
;begin
	line 193
	mov R2,#000H
	mov R3,#000H
	mov R4,#000H
	mov R5,#000H
	mov R0,#SQRT|F
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __Singlelessorequ
	RegAdd ##,#__Singlelessorequ
	.jmpz &&43
;  if f<=0.0 then
;  begin
	line 195
	mov SQRT,#00H
	mov SQRT+1,#00H
	mov SQRT+2,#00H
	mov SQRT+3,#00H
	jmp &&10
;    Sqrt:=0.0; exit;
&&43:
;  end;
	line 197
	mov SQRT|V1,SQRT|F
	mov SQRT|V1+1,SQRT|F+1
	mov SQRT|V1+2,SQRT|F+2
	mov SQRT|V1+3,SQRT|F+3
;  v1:=f;
	line 198
	mov R2,#000H
	mov R3,#000H
	mov R4,#080H
	mov R5,#041H
	mov R0,#SQRT|V1
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __Singleless
	RegAdd ##,#__Singleless
	.jmpz &&44
	mov R2,SQRT|V1
	mov R3,SQRT|V1+1
	mov R4,SQRT|V1+2
	mov R5,SQRT|V1+3
	call __PushLintLiteral
	RegAdd ##,#__PushLintLiteral
	DL 41800000H
	call __divSingle
	RegAdd ##,#__divSingle
	pop SQRT|V1+3
	pop SQRT|V1+2
	pop SQRT|V1+1
	pop SQRT|V1
&&44:
;  if v1<1.0 then v1:=1.0/v1;
	line 199
	mov GETANDRESETEXP|A,SQRT|V1
	mov GETANDRESETEXP|A+1,SQRT|V1+1
	mov GETANDRESETEXP|A+2,SQRT|V1+2
	mov GETANDRESETEXP|A+3,SQRT|V1+3
	mov A,#SQRT|EXP+0
	mov GETANDRESETEXP|B,A
	RegAdd ##,#&GETANDRESETEXP
	call &GETANDRESETEXP
	mov SQRT|V1,R2
	mov SQRT|V1+1,R3
	mov SQRT|V1+2,R4
	mov SQRT|V1+3,R5
;  v1:=GetAndResetExp(v1,exp);
	line 200
	mov SETEXP|A,SQRT|V1
	mov SETEXP|A+1,SQRT|V1+1
	mov SETEXP|A+2,SQRT|V1+2
	mov SETEXP|A+3,SQRT|V1+3
	mov R1,#001H
	mov R2,SQRT|EXP
	mov R3,SQRT|EXP+1
	call __shr16
	RegAdd ##,#__shr16
	mov SETEXP|B,R2
	mov SETEXP|B+1,R3
	RegAdd ##,#&SETEXP
	call &SETEXP
	mov SQRT|V1,R2
	mov SQRT|V1+1,R3
	mov SQRT|V1+2,R4
	mov SQRT|V1+3,R5
;  v1:=SetExp(v1,exp shr 1);	// make an educated guess
	line 201
	mov R2,#000H
	mov R3,#000H
	mov R4,#080H
	mov R5,#041H
	mov R0,#SQRT|F
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __Singleless
	RegAdd ##,#__Singleless
	.jmpz &&45
	mov R2,SQRT|V1
	mov R3,SQRT|V1+1
	mov R4,SQRT|V1+2
	mov R5,SQRT|V1+3
	call __PushLintLiteral
	RegAdd ##,#__PushLintLiteral
	DL 41800000H
	call __divSingle
	RegAdd ##,#__divSingle
	pop SQRT|V1+3
	pop SQRT|V1+2
	pop SQRT|V1+1
	pop SQRT|V1
&&45:
;  if f<1.0 then v1:=1.0/v1;
	line 202
	mov SQRT|N,#00H
;  n:=0;
&&46:
	line 203
	mov R2,#014H
	mov A,SQRT|N
	clr C
	subb A,R2
	.jmpnc &&47
;  while n<20 do 
;  begin
	line 205
	mov R2,SQRT|V1
	mov R3,SQRT|V1+1
	mov R4,SQRT|V1+2
	mov R5,SQRT|V1+3
	mov R0,#SQRT|F
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __divSingle
	RegAdd ##,#__divSingle
	mov R2,SQRT|V1
	mov R3,SQRT|V1+1
	mov R4,SQRT|V1+2
	mov R5,SQRT|V1+3
	call __AddSingle
	RegAdd ##,#__AddSingle
	mov R2,#000H
	mov R3,#000H
	mov R4,#080H
	mov R5,#042H
	call __divSingle
	RegAdd ##,#__divSingle
	pop SQRT|V2+3
	pop SQRT|V2+2
	pop SQRT|V2+1
	pop SQRT|V2
;    v2:=(f/v1 + v1)/2.0;
	line 206
	mov R2,SQRT|V1
	mov R3,SQRT|V1+1
	mov R4,SQRT|V1+2
	mov R5,SQRT|V1+3
	mov R0,#SQRT|V2
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __lintequ
	RegAdd ##,#__lintequ
	.jmpz &&48
	jmp &&47
&&48:
;    if v2 = v1 then break;
	line 207
	mov SQRT|V1,SQRT|V2
	mov SQRT|V1+1,SQRT|V2+1
	mov SQRT|V1+2,SQRT|V2+2
	mov SQRT|V1+3,SQRT|V2+3
;    v1:=v2;
	line 208
	mov R0,#SQRT|N+0
	inc @R0
;    inc(n);
	jmp &&46
&&47:
;  end;
	line 210
	mov SQRT,SQRT|V1
	mov SQRT+1,SQRT|V1+1
	mov SQRT+2,SQRT|V1+2
	mov SQRT+3,SQRT|V1+3
;  Sqrt:=v1;
&&10:
	mov R0,#SQRT
	call __ldldR2345
	RegAdd ##,#__ldldR2345
	ret

	RegEnd ;#&SQRT
;end;
 endif
;{#P endif}
;{#S-}
;{#S MathShareArea}
 ifref @Ln
;{#P ifref @Ln}
;function Ln(f: Single): Single; 
;var
;  exp: Integer;
;const
LN|COEFF:
;  coeff: array[0..8] of Single =
	DL 00000000H
	DL 40FFFFC4H
	DL BFFFEF80H
	DL 3FA9E190H
	DL BEF682ECH
;  (0.0000000000,0.9999964239,-0.4998741238,0.3317990258,-0.2407338084,
	DL 3EABAD82H
	DL BDC33C0EH
	DL 3C93D187H
	DL B9D37841H
;   0.1676540711,-0.0953293897,0.0360884937,-0.0064535442);
	RegUse #&LN
&LN:
;begin
	line 224
	mov R2,#000H
	mov R3,#000H
	mov R4,#000H
	mov R5,#000H
	mov R0,#LN|F
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __Singlelessorequ
	RegAdd ##,#__Singlelessorequ
	.jmpz &&49
;  if f<=0.0 then
;  begin
	line 226
	mov LN,#00H
	mov LN+1,#00H
	mov LN+2,#00H
	mov LN+3,#00H
	jmp &&11
;    Ln:=0.0; exit;
&&49:
;  end;
	line 228
	mov GETANDRESETEXP|A,LN|F
	mov GETANDRESETEXP|A+1,LN|F+1
	mov GETANDRESETEXP|A+2,LN|F+2
	mov GETANDRESETEXP|A+3,LN|F+3
	mov A,#LN|EXP+0
	mov GETANDRESETEXP|B,A
	RegAdd ##,#&GETANDRESETEXP
	call &GETANDRESETEXP
	.push LA
	mov R2,#000H
	mov R3,#000H
	mov R4,#080H
	mov R5,#042H
	call __multSingle
	RegAdd ##,#__multSingle
	mov R2,#000H
	mov R3,#000H
	mov R4,#080H
	mov R5,#041H
	call __subSingle
	RegAdd ##,#__subSingle
	pop LN|F+3
	pop LN|F+2
	pop LN|F+1
	pop LN|F
;  f:=GetAndResetExp(f,exp)*2.0-1.0;
	line 229
	mov R0,#LN|EXP+0
	call __Dec16Data
	RegAdd ##,#__Dec16Data
;  dec(exp);
	line 230
	mov DO_POLY|X,LN|F
	mov DO_POLY|X+1,LN|F+1
	mov DO_POLY|X+2,LN|F+2
	mov DO_POLY|X+3,LN|F+3
	mov R2,#.lo(LN|COEFF+0)
	mov R3,#.hi(LN|COEFF+0)
	mov A,R2
	mov DO_POLY|D,A
	mov DO_POLY|N,#08H
	RegAdd ##,&DO_POLY
	call &DO_POLY
	mov LN|F,R2
	mov LN|F+1,R3
	mov LN|F+2,R4
	mov LN|F+3,R5
;  f:=Do_Poly(f,@coeff,8);
	line 231
	mov INTTOSINGLE|A,LN|EXP
	mov INTTOSINGLE|A+1,LN|EXP+1
	mov INTTOSINGLE|A+2,#0
	mov INTTOSINGLE|A+3,#0
	RegAdd ##,#&INTTOSINGLE
	call &INTTOSINGLE
	call __PushLintLiteral
	RegAdd ##,#__PushLintLiteral
	DL 40B17218H
	call __multSingle
	RegAdd ##,#__multSingle
	.Pop LA
	mov R0,#LN|F
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __AddSingle
	RegAdd ##,#__AddSingle
	pop LN+3
	pop LN+2
	pop LN+1
	pop LN
;  Ln:=f+0.69314718055995*IntToSingle(exp);
&&11:
	mov R0,#LN
	call __ldldR2345
	RegAdd ##,#__ldldR2345
	ret

	RegEnd ;#&LN
;end;
 Endif
;{#P Endif}
;{#S-}
 IfRef @Log10
;{#P IfRef @Log10}
;{#S Math3ShareArea}
;function log10(f: Single): Single; 
	RegUse #&LOG10
&LOG10:
;begin
	line 239
	mov LN|F,LOG10|F
	mov LN|F+1,LOG10|F+1
	mov LN|F+2,LOG10|F+2
	mov LN|F+3,LOG10|F+3
	RegAdd ##,#&LN
	call &LN
	.push LA
	mov R2,#0D9H
	mov R3,#05BH
	mov R4,#0DEH
	mov R5,#03FH
	call __multSingle
	RegAdd ##,#__multSingle
	pop LOG10+3
	pop LOG10+2
	pop LOG10+1
	pop LOG10
;  Log10:=ln(f)*0.4342944819;
&&12:
	mov R0,#LOG10
	call __ldldR2345
	RegAdd ##,#__ldldR2345
	ret

	RegEnd ;#&LOG10
;end;
;{#S-}
 endif
;{#P endif}
;{#S MathShareArea}
 ifref @EXP
;{#P ifref @EXP}
;function EXP(f: Single): Single; 
;const
EXP|COEFF:
;  coeff: array[0..9] of Single =
	DL 41800000H
	DL 40B17218H
	DL 3EF5FDF0H
	DL 3CE35847H
;  (1.0000000000e+00,6.9314718056e-01,2.4022650695e-01,5.5504108945e-02,
	DL 3A9D9558H
	DL 37AEC482H
	DL 34A178A8H
	DL 318093EFH
;   9.6181261779e-03,1.3333710529e-03,1.5399104432e-04,1.5327675257e-05,
	DL 2DA792A0H
	DL 2A955646H
;   1.2485143336e-06,1.3908092221e-07);
;var
;  ex: Integer;
;  sign: boolean;
	RegUse #&EXP
&EXP:
;begin
	line 255
	mov R2,#000H
	mov R3,#000H
	mov R4,#000H
	mov R5,#000H
	mov R0,#EXP|F
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __lintequ
	RegAdd ##,#__lintequ
	.jmpz &&50
;  if f=0.0 then
;  begin
	line 257
	mov EXP,#00H
	mov EXP+1,#00H
	mov EXP+2,#80H
	mov EXP+3,#41H
	jmp &&13
;    EXP:=1.0; exit;
&&50:
;  end;
	line 259
	mov R2,#000H
	mov R3,#000H
	mov R4,#000H
	mov R5,#000H
	mov R0,#EXP|F
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __Singleless
	RegAdd ##,#__Singleless
	mov EXP|SIGN,A
;  sign:=f<0.0;
	line 260
	mov A,EXP|SIGN
	.jmpz &&51
	mov R2,EXP|F
	mov R3,EXP|F+1
	mov R4,EXP|F+2
	mov R5,EXP|F+3
	call __NotSingle
	RegAdd ##,#__NotSingle
	mov EXP|F,R2
	mov EXP|F+1,R3
	mov EXP|F+2,R4
	mov EXP|F+3,R5
&&51:
;  if sign then f:=-f;
	line 261
	mov R2,#03BH
	mov R3,#0AAH
	mov R4,#0B8H
	mov R5,#041H
	mov R0,#EXP|F
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __multSingle
	RegAdd ##,#__multSingle
	pop EXP|F+3
	pop EXP|F+2
	pop EXP|F+1
	pop EXP|F
;  f:=f*1.4426950409; // convert to log2
	line 262
	mov TRUNC|A,EXP|F
	mov TRUNC|A+1,EXP|F+1
	mov TRUNC|A+2,EXP|F+2
	mov TRUNC|A+3,EXP|F+3
	RegAdd ##,#&TRUNC
	call &TRUNC
	mov EXP|EX,R2
	mov EXP|EX+1,R3
;  ex:=trunc(f);
	line 263
	mov INTTOSINGLE|A,EXP|EX
	mov INTTOSINGLE|A+1,EXP|EX+1
	mov INTTOSINGLE|A+2,#0
	mov INTTOSINGLE|A+3,#0
	RegAdd ##,#&INTTOSINGLE
	call &INTTOSINGLE
	mov R0,#EXP|F
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __subSingle
	RegAdd ##,#__subSingle
	pop EXP|F+3
	pop EXP|F+2
	pop EXP|F+1
	pop EXP|F
;  f:=f-IntToSingle(ex);
	line 264
	mov DO_POLY|X,EXP|F
	mov DO_POLY|X+1,EXP|F+1
	mov DO_POLY|X+2,EXP|F+2
	mov DO_POLY|X+3,EXP|F+3
	mov R2,#.lo(EXP|COEFF+0)
	mov R3,#.hi(EXP|COEFF+0)
	mov A,R2
	mov DO_POLY|D,A
	mov DO_POLY|N,#09H
	RegAdd ##,&DO_POLY
	call &DO_POLY
	mov SETEXP|A,R2
	mov SETEXP|A+1,R3
	mov SETEXP|A+2,R4
	mov SETEXP|A+3,R5
	mov SETEXP|B,EXP|EX
	mov SETEXP|B+1,EXP|EX+1
	RegAdd ##,#&SETEXP
	call &SETEXP
	mov EXP|F,R2
	mov EXP|F+1,R3
	mov EXP|F+2,R4
	mov EXP|F+3,R5
;  f:=SetExp(Do_Poly(f,@coeff,9),ex);
	line 265
	mov A,EXP|SIGN
	.jmpz &&52
	mov R2,EXP|F
	mov R3,EXP|F+1
	mov R4,EXP|F+2
	mov R5,EXP|F+3
	call __PushLintLiteral
	RegAdd ##,#__PushLintLiteral
	DL 41800000H
	call __divSingle
	RegAdd ##,#__divSingle
	pop EXP+3
	pop EXP+2
	pop EXP+1
	pop EXP
	jmp &&53
&&52:
	mov EXP,EXP|F
	mov EXP+1,EXP|F+1
	mov EXP+2,EXP|F+2
	mov EXP+3,EXP|F+3
&&53:
;  if sign then EXP:=1.0/f else EXP:=f;
&&13:
	mov R0,#EXP
	call __ldldR2345
	RegAdd ##,#__ldldR2345
	ret

	RegEnd ;#&EXP
;end;
 endif
;{#P endif}
;{#S-}
 ifref @Power
;{#P ifref @Power}
;{#S Math3ShareArea}
;function POWER(x,y: Single): Single; 
	RegUse #&POWER
&POWER:
;begin
	line 273
	mov R2,#000H
	mov R3,#000H
	mov R4,#000H
	mov R5,#000H
	mov R0,#POWER|Y
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __lintequ
	RegAdd ##,#__lintequ
	.jmpz &&54
;  if y=0.0 then 
;  begin
	line 275
	mov POWER,#00H
	mov POWER+1,#00H
	mov POWER+2,#80H
	mov POWER+3,#41H
	jmp &&14
;    POWER:=1.0; exit;
&&54:
;  end;
	line 277
	mov R2,#000H
	mov R3,#000H
	mov R4,#000H
	mov R5,#000H
	mov R0,#POWER|X
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __Singlelessorequ
	RegAdd ##,#__Singlelessorequ
	.jmpz &&55
;  if x<=0.0 then
;  begin
	line 279
	mov POWER,#00H
	mov POWER+1,#00H
	mov POWER+2,#00H
	mov POWER+3,#00H
	jmp &&14
;    POWER:=0.0; exit;
&&55:
;  end;
	line 281
	mov LN|F,POWER|X
	mov LN|F+1,POWER|X+1
	mov LN|F+2,POWER|X+2
	mov LN|F+3,POWER|X+3
	RegAdd ##,#&LN
	call &LN
	.push LA
	mov R2,POWER|Y
	mov R3,POWER|Y+1
	mov R4,POWER|Y+2
	mov R5,POWER|Y+3
	call __multSingle
	RegAdd ##,#__multSingle
	pop EXP|F+3
	pop EXP|F+2
	pop EXP|F+1
	pop EXP|F
	RegAdd ##,#&EXP
	call &EXP
	mov POWER,R2
	mov POWER+1,R3
	mov POWER+2,R4
	mov POWER+3,R5
;  POWER:=EXP(ln(x)*y);
&&14:
	mov R0,#POWER
	call __ldldR2345
	RegAdd ##,#__ldldR2345
	ret

	RegEnd ;#&POWER
;end;
;{#S-}
 endif
;{#P endif}
;{#S ASCIIShareArea}
 ifref @Frac
;{#P ifref @Frac}
;function Frac(x: Single): Single; 
	RegUse #&FRAC
&FRAC:
;begin
	line 289
	mov INT|A,FRAC|X
	mov INT|A+1,FRAC|X+1
	mov INT|A+2,FRAC|X+2
	mov INT|A+3,FRAC|X+3
	RegAdd ##,#&INT
	call &INT
	mov R0,#FRAC|X
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __subSingle
	RegAdd ##,#__subSingle
	pop FRAC+3
	pop FRAC+2
	pop FRAC+1
	pop FRAC
;  Frac:=x-int(x);
&&15:
	mov R0,#FRAC
	call __ldldR2345
	RegAdd ##,#__ldldR2345
	ret

	RegEnd ;#&FRAC
;end;
 endif
;{#P endif}
;{#S-}
;{#S Math2ShareArea}
 ifref @ARCSIN
;{#P ifref @ARCSIN}
;function ARCSIN(f: Single): Single; 
	RegUse #&ARCSIN
&ARCSIN:
;begin
	line 297
	mov SQR|F,ARCSIN|F
	mov SQR|F+1,ARCSIN|F+1
	mov SQR|F+2,ARCSIN|F+2
	mov SQR|F+3,ARCSIN|F+3
	RegAdd ##,#&SQR
	call &SQR
	call __PushLintLiteral
	RegAdd ##,#__PushLintLiteral
	DL 41800000H
	call __subSingle
	RegAdd ##,#__subSingle
	pop SQRT|F+3
	pop SQRT|F+2
	pop SQRT|F+1
	pop SQRT|F
	RegAdd ##,#&SQRT
	call &SQRT
	mov R0,#ARCSIN|F
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __divSingle
	RegAdd ##,#__divSingle
	pop ARCTAN|F+3
	pop ARCTAN|F+2
	pop ARCTAN|F+1
	pop ARCTAN|F
	RegAdd ##,#&ARCTAN
	call &ARCTAN
	mov ARCSIN,R2
	mov ARCSIN+1,R3
	mov ARCSIN+2,R4
	mov ARCSIN+3,R5
;  ARCSIN:=ARCTAN(F/SQRT(1.0-SQR(F)));
&&16:
	mov R0,#ARCSIN
	call __ldldR2345
	RegAdd ##,#__ldldR2345
	ret

	RegEnd ;#&ARCSIN
;end;
 Endif
;{#P Endif}
;{#S-}
;{#S Math2ShareArea}
 Ifref @ARCCOS
;{#P Ifref @ARCCOS}
;function ARCCOS(f: Single): Single; 
	RegUse #&ARCCOS
&ARCCOS:
;begin
	line 305
	mov SQR|F,ARCCOS|F
	mov SQR|F+1,ARCCOS|F+1
	mov SQR|F+2,ARCCOS|F+2
	mov SQR|F+3,ARCCOS|F+3
	RegAdd ##,#&SQR
	call &SQR
	call __PushLintLiteral
	RegAdd ##,#__PushLintLiteral
	DL 41800000H
	call __subSingle
	RegAdd ##,#__subSingle
	pop SQRT|F+3
	pop SQRT|F+2
	pop SQRT|F+1
	pop SQRT|F
	RegAdd ##,#&SQRT
	call &SQRT
	.push LA
	mov R2,ARCCOS|F
	mov R3,ARCCOS|F+1
	mov R4,ARCCOS|F+2
	mov R5,ARCCOS|F+3
	call __divSingle
	RegAdd ##,#__divSingle
	pop ARCTAN|F+3
	pop ARCTAN|F+2
	pop ARCTAN|F+1
	pop ARCTAN|F
	RegAdd ##,#&ARCTAN
	call &ARCTAN
	mov ARCCOS,R2
	mov ARCCOS+1,R3
	mov ARCCOS+2,R4
	mov ARCCOS+3,R5
;  ARCCOS:=ARCTAN(SQRT(1.0-SQR(F))/F);
&&17:
	mov R0,#ARCCOS
	call __ldldR2345
	RegAdd ##,#__ldldR2345
	ret

	RegEnd ;#&ARCCOS
;end;
 Endif
;{#P Endif}
;{#S-}
;{#S Math2ShareArea}
 Ifref @SINH
;{#P Ifref @SINH}
;function SINH(f: Single): Single; 
	RegUse #&SINH
&SINH:
;begin
	line 313
	mov EXP|F,SINH|F
	mov EXP|F+1,SINH|F+1
	mov EXP|F+2,SINH|F+2
	mov EXP|F+3,SINH|F+3
	RegAdd ##,#&EXP
	call &EXP
	mov SINH|F,R2
	mov SINH|F+1,R3
	mov SINH|F+2,R4
	mov SINH|F+3,R5
;  f:=exp(f);
	line 314
	mov R2,SINH|F
	mov R3,SINH|F+1
	mov R4,SINH|F+2
	mov R5,SINH|F+3
	call __PushLintLiteral
	RegAdd ##,#__PushLintLiteral
	DL 41800000H
	call __divSingle
	RegAdd ##,#__divSingle
	.Pop LA
	mov R0,#SINH|F
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __subSingle
	RegAdd ##,#__subSingle
	.Pop LA
	call __PushLintLiteral
	RegAdd ##,#__PushLintLiteral
	DL 40800000H
	call __multSingle
	RegAdd ##,#__multSingle
	pop SINH+3
	pop SINH+2
	pop SINH+1
	pop SINH
;  SINH:=0.5*(f-1.0/f);
&&18:
	mov R0,#SINH
	call __ldldR2345
	RegAdd ##,#__ldldR2345
	ret

	RegEnd ;#&SINH
;end;
 Endif
;{#P Endif}
;{#S-}
;{#S Math2ShareArea}
 Ifref @COSH
;{#P Ifref @COSH}
;function COSH(f: Single): Single; 
	RegUse #&COSH
&COSH:
;begin
	line 322
	mov EXP|F,COSH|F
	mov EXP|F+1,COSH|F+1
	mov EXP|F+2,COSH|F+2
	mov EXP|F+3,COSH|F+3
	RegAdd ##,#&EXP
	call &EXP
	mov COSH|F,R2
	mov COSH|F+1,R3
	mov COSH|F+2,R4
	mov COSH|F+3,R5
;  f:=exp(f);
	line 323
	mov R2,COSH|F
	mov R3,COSH|F+1
	mov R4,COSH|F+2
	mov R5,COSH|F+3
	call __PushLintLiteral
	RegAdd ##,#__PushLintLiteral
	DL 41800000H
	call __divSingle
	RegAdd ##,#__divSingle
	.Pop LA
	mov R0,#COSH|F
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __AddSingle
	RegAdd ##,#__AddSingle
	.Pop LA
	call __PushLintLiteral
	RegAdd ##,#__PushLintLiteral
	DL 40800000H
	call __multSingle
	RegAdd ##,#__multSingle
	pop COSH+3
	pop COSH+2
	pop COSH+1
	pop COSH
;  COSH:=0.5*(f+1.0/f);
&&19:
	mov R0,#COSH
	call __ldldR2345
	RegAdd ##,#__ldldR2345
	ret

	RegEnd ;#&COSH
;end;
 Endif
;{#P Endif}
;{#S-}
;{#S Math2ShareArea}
 Ifref @TANH
;{#P Ifref @TANH}
;function TANH(f: Single): Single; 
	RegUse #&TANH
&TANH:
;begin
	line 331
	mov EXP|F,TANH|F
	mov EXP|F+1,TANH|F+1
	mov EXP|F+2,TANH|F+2
	mov EXP|F+3,TANH|F+3
	RegAdd ##,#&EXP
	call &EXP
	mov TANH|F,R2
	mov TANH|F+1,R3
	mov TANH|F+2,R4
	mov TANH|F+3,R5
;  f:=exp(f);
	line 332
	mov R2,TANH|F
	mov R3,TANH|F+1
	mov R4,TANH|F+2
	mov R5,TANH|F+3
	call __PushLintLiteral
	RegAdd ##,#__PushLintLiteral
	DL 41800000H
	call __divSingle
	RegAdd ##,#__divSingle
	.Pop LA
	mov R0,#TANH|F
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __subSingle
	RegAdd ##,#__subSingle
	mov R2,TANH|F
	mov R3,TANH|F+1
	mov R4,TANH|F+2
	mov R5,TANH|F+3
	call __PushLintLiteral
	RegAdd ##,#__PushLintLiteral
	DL 41800000H
	call __divSingle
	RegAdd ##,#__divSingle
	.Pop LA
	mov R0,#TANH|F
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __AddSingle
	RegAdd ##,#__AddSingle
	.Pop LA
	call __divSingle
	RegAdd ##,#__divSingle
	pop TANH+3
	pop TANH+2
	pop TANH+1
	pop TANH
;  TANH:=(f-1.0/f)/(f+1.0/f);
&&20:
	mov R0,#TANH
	call __ldldR2345
	RegAdd ##,#__ldldR2345
	ret

	RegEnd ;#&TANH
;end;
 Endif
;{#P Endif}
;{#S-}
;{#S ASCIIShareArea}
 ifref @StrToSingle
;{#P ifref @StrToSingle}
;function StrToSingle(input: string15): Single; 
;var
;  sign,expsign: byte;
;  exp,eexp: integer;
;  w,l: Single;
;  s: word;
;const
STRTOSINGLE|TEN:
	DL 44A00000H
;  ten: Single=10.0;
	RegUse #&STRTOSINGLE
&STRTOSINGLE:
;begin
	line 348
	mov STRTOSINGLE|S,#01H
	mov STRTOSINGLE|S+1,#00H
;  s:=1;
	line 349
	mov R0,#STRTOSINGLE|INPUT
	call __pushIString
	RegAdd ##,#__pushIString
	mov A,#024H
	call __AddCharToString
	RegAdd ##,#__AddCharToString
	mov R0,#STRTOSINGLE|INPUT
	mov R2,#15
	call __popIString
	RegAdd ##,#__popIString
;  Input:=Input+'$'; 
&&56:
	line 350
	mov A,STRTOSINGLE|S
	add a,#STRTOSINGLE|INPUT+0
	mov R0,a
	mov A,@R0
	mov R2,#020H
	.cjne A,R2,&&57
	mov R0,#STRTOSINGLE|S+0
	call __Inc16Data
	RegAdd ##,#__Inc16Data
	jmp &&56
&&57:
;  while Input[s]=' ' do inc(s);
	line 351
	mov STRTOSINGLE|EXPSIGN,#00H
;  expsign:=0;
	line 352
	mov STRTOSINGLE|SIGN,#00H
;  sign:=0;
	line 353
	mov STRTOSINGLE|L,#00H
	mov STRTOSINGLE|L+1,#00H
	mov STRTOSINGLE|L+2,#00H
	mov STRTOSINGLE|L+3,#00H
;  l := 0.0;
	line 354
	mov STRTOSINGLE|EXP,#00H
	mov STRTOSINGLE|EXP+1,#00H
;  exp := 0;
	line 355
	mov A,STRTOSINGLE|S
	add a,#STRTOSINGLE|INPUT+0
	mov R0,a
	mov A,@R0
	mov R2,#02DH
	.cjne A,R2,&&58
;  if Input[s]='-' then
;  begin
	line 357
	mov R0,#STRTOSINGLE|S+0
	call __Inc16Data
	RegAdd ##,#__Inc16Data
;    inc(s);
	line 358
	mov STRTOSINGLE|SIGN,#01H
;    sign := 1;
&&58:
;  end;
&&59:
	line 360
	mov A,STRTOSINGLE|S
	add a,#STRTOSINGLE|INPUT+0
	mov R0,a
	mov A,@R0
	mov R6,#.lo(&&60)
	mov R7,#.hi(&&60)
	call __ConstSet
	RegAdd ##,#__ConstSet
	DB 1
	DB 48,57
&&60:
	.jmpz &&61
;  while Input[s] in ['0'..'9'] do
;  begin
	line 362
	mov A,STRTOSINGLE|S
	add a,#STRTOSINGLE|INPUT+0
	mov R0,a
	mov A,@R0
	clr C
	subb A,#48
	mov R5,#0
	mov R4,#0
	mov R3,#0
	mov R2,a
	mov INTTOSINGLE|A,R2
	mov INTTOSINGLE|A+1,R3
	mov INTTOSINGLE|A+2,R4
	mov INTTOSINGLE|A+3,R5
	RegAdd ##,#&INTTOSINGLE
	call &INTTOSINGLE
	mov STRTOSINGLE|W,R2
	mov STRTOSINGLE|W+1,R3
	mov STRTOSINGLE|W+2,R4
	mov STRTOSINGLE|W+3,R5
;    w:=IntToSingle(ord(Input[s])-$30);
	line 363
	mov R2,STRTOSINGLE|L
	mov R3,STRTOSINGLE|L+1
	mov R4,STRTOSINGLE|L+2
	mov R5,STRTOSINGLE|L+3
	mov DPTR,#STRTOSINGLE|TEN
	clr A
	movc A,@A+DPTR
	push ACC
	inc DPTR
	clr A
	movc A,@A+DPTR
	push ACC
	inc DPTR
	clr A
	movc A,@A+DPTR
	push ACC
	inc DPTR
	clr A
	movc A,@A+DPTR
	push ACC
	call __multSingle
	RegAdd ##,#__multSingle
	mov R2,STRTOSINGLE|W
	mov R3,STRTOSINGLE|W+1
	mov R4,STRTOSINGLE|W+2
	mov R5,STRTOSINGLE|W+3
	call __AddSingle
	RegAdd ##,#__AddSingle
	pop STRTOSINGLE|L+3
	pop STRTOSINGLE|L+2
	pop STRTOSINGLE|L+1
	pop STRTOSINGLE|L
;    l := ten * l + w;
	line 364
	mov R0,#STRTOSINGLE|S+0
	call __Inc16Data
	RegAdd ##,#__Inc16Data
;    inc(s);
	jmp &&59
&&61:
;  end;
	line 366
	mov A,STRTOSINGLE|S
	add a,#STRTOSINGLE|INPUT+0
	mov R0,a
	mov A,@R0
	mov R2,#02EH
	.cjne A,R2,&&62
;  if Input[s]='.' then
;  begin
	line 368
	mov R0,#STRTOSINGLE|S+0
	call __Inc16Data
	RegAdd ##,#__Inc16Data
;    inc(s);
&&63:
	line 369
	mov A,STRTOSINGLE|S
	add a,#STRTOSINGLE|INPUT+0
	mov R0,a
	mov A,@R0
	mov R6,#.lo(&&64)
	mov R7,#.hi(&&64)
	call __ConstSet
	RegAdd ##,#__ConstSet
	DB 1
	DB 48,57
&&64:
	.jmpz &&65
;    while Input[s] in ['0'..'9'] do
;    begin
	line 371
	mov R0,#STRTOSINGLE|EXP+0
	call __Dec16Data
	RegAdd ##,#__Dec16Data
;      dec(exp);
	line 372
	mov A,STRTOSINGLE|S
	add a,#STRTOSINGLE|INPUT+0
	mov R0,a
	mov A,@R0
	clr C
	subb A,#48
	mov R5,#0
	mov R4,#0
	mov R3,#0
	mov R2,a
	mov INTTOSINGLE|A,R2
	mov INTTOSINGLE|A+1,R3
	mov INTTOSINGLE|A+2,R4
	mov INTTOSINGLE|A+3,R5
	RegAdd ##,#&INTTOSINGLE
	call &INTTOSINGLE
	mov STRTOSINGLE|W,R2
	mov STRTOSINGLE|W+1,R3
	mov STRTOSINGLE|W+2,R4
	mov STRTOSINGLE|W+3,R5
;      w:=IntToSingle(ord(Input[s])-$30);
	line 373
	mov R2,STRTOSINGLE|L
	mov R3,STRTOSINGLE|L+1
	mov R4,STRTOSINGLE|L+2
	mov R5,STRTOSINGLE|L+3
	mov DPTR,#STRTOSINGLE|TEN
	clr A
	movc A,@A+DPTR
	push ACC
	inc DPTR
	clr A
	movc A,@A+DPTR
	push ACC
	inc DPTR
	clr A
	movc A,@A+DPTR
	push ACC
	inc DPTR
	clr A
	movc A,@A+DPTR
	push ACC
	call __multSingle
	RegAdd ##,#__multSingle
	mov R2,STRTOSINGLE|W
	mov R3,STRTOSINGLE|W+1
	mov R4,STRTOSINGLE|W+2
	mov R5,STRTOSINGLE|W+3
	call __AddSingle
	RegAdd ##,#__AddSingle
	pop STRTOSINGLE|L+3
	pop STRTOSINGLE|L+2
	pop STRTOSINGLE|L+1
	pop STRTOSINGLE|L
;      l := ten * l +w;
	line 374
	mov R0,#STRTOSINGLE|S+0
	call __Inc16Data
	RegAdd ##,#__Inc16Data
;      inc(s);
	jmp &&63
&&65:
;    end;
&&62:
;  end;
	line 377
	mov STRTOSINGLE|EEXP,#00H
	mov STRTOSINGLE|EEXP+1,#00H
;  eexp := 0;
	line 378
	mov A,STRTOSINGLE|S
	add a,#STRTOSINGLE|INPUT+0
	mov R0,a
	mov A,@R0
	mov R2,A
	call __UpCase
	RegAdd ##,#__UpCase
	mov R2,#045H
	.cjne A,R2,&&66
;  if upcase(Input[s])='E' then
;  begin
	line 380
	mov R0,#STRTOSINGLE|S+0
	call __Inc16Data
	RegAdd ##,#__Inc16Data
;    inc(s);
	line 381
	mov A,STRTOSINGLE|S
	add a,#STRTOSINGLE|INPUT+0
	mov R0,a
	mov A,@R0
	mov R2,#02DH
	.cjne A,R2,&&67
;    if Input[s]='-' then
;    begin
	line 383
	mov STRTOSINGLE|EXPSIGN,#01H
;      expsign:=1;
	line 384
	mov R0,#STRTOSINGLE|S+0
	call __Inc16Data
	RegAdd ##,#__Inc16Data
;      inc(s);
&&67:
;    end;
	line 386
	mov A,STRTOSINGLE|S
	add a,#STRTOSINGLE|INPUT+0
	mov R0,a
	mov A,@R0
	mov R2,#02BH
	.cjne A,R2,&&68
;    if Input[s]='+' then
;    begin
	line 388
	mov R0,#STRTOSINGLE|S+0
	call __Inc16Data
	RegAdd ##,#__Inc16Data
;      inc(s);
&&68:
;    end;
&&69:
	line 390
	mov A,STRTOSINGLE|S
	add a,#STRTOSINGLE|INPUT+0
	mov R0,a
	mov A,@R0
	mov R6,#.lo(&&70)
	mov R7,#.hi(&&70)
	call __ConstSet
	RegAdd ##,#__ConstSet
	DB 1
	DB 48,57
&&70:
	.jmpz &&71
;    while Input[s] in ['0'..'9'] do
;    begin
	line 392
	mov R4,#00AH
	mov R5,#000H
	mov R2,STRTOSINGLE|EEXP
	mov R3,STRTOSINGLE|EEXP+1
	call __smult16reg
	RegAdd ##,#__smult16reg
	.push WA
	mov A,STRTOSINGLE|S
	add a,#STRTOSINGLE|INPUT+0
	mov R0,a
	mov A,@R0
	clr C
	subb A,#48
	mov R2,A
	mov R3,#0
	.pop WB
	call __AddWords
	RegAdd ##,#__AddWords
	mov STRTOSINGLE|EEXP,R2
	mov STRTOSINGLE|EEXP+1,R3
;      eexp := eexp*10 + (ord(Input[s])-$30);
	line 393
	mov R0,#STRTOSINGLE|S+0
	call __Inc16Data
	RegAdd ##,#__Inc16Data
;      inc(s);
	jmp &&69
&&71:
;    end;
	line 395
	mov R2,#001H
	mov A,STRTOSINGLE|EXPSIGN
	.cjne A,R2,&&72
	mov R2,STRTOSINGLE|EEXP
	mov R3,STRTOSINGLE|EEXP+1
	call __NotInt
	RegAdd ##,#__NotInt
	mov STRTOSINGLE|EEXP,R2
	mov STRTOSINGLE|EEXP+1,R3
&&72:
;    if expsign=1 then eexp := -eexp;
	line 396
	mov R0,#STRTOSINGLE|EEXP
	mov R1,#STRTOSINGLE|EXP
	call __AddWordsIndirect
	RegAdd ##,#__AddWordsIndirect
	mov STRTOSINGLE|EXP,R2
	mov STRTOSINGLE|EXP+1,R3
;    exp:=exp+eexp;
&&66:
;  end;
&&73:
	line 398
	mov R4,#000H
	mov R5,#000H
	mov R2,STRTOSINGLE|EXP
	mov R3,STRTOSINGLE|EXP+1
	call __Intless
	RegAdd ##,#__Intless
	.jmpz &&74
;  while exp<0 do
;  begin
	line 400
	mov DPTR,#STRTOSINGLE|TEN
	call __ldlcR2345
	RegAdd ##,#__ldlcR2345
	mov R0,#STRTOSINGLE|L
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __divSingle
	RegAdd ##,#__divSingle
	pop STRTOSINGLE|L+3
	pop STRTOSINGLE|L+2
	pop STRTOSINGLE|L+1
	pop STRTOSINGLE|L
;    l := l / ten;
	line 401
	mov R0,#STRTOSINGLE|EXP+0
	call __Inc16Data
	RegAdd ##,#__Inc16Data
;    inc(exp);
	jmp &&73
&&74:
;  end;
&&75:
	line 403
	mov R4,#000H
	mov R5,#000H
	mov R2,STRTOSINGLE|EXP
	mov R3,STRTOSINGLE|EXP+1
	call __Intgreater
	RegAdd ##,#__Intgreater
	.jmpz &&76
;  while(exp>0) do
;  begin
	line 405
	mov DPTR,#STRTOSINGLE|TEN
	call __ldlcR2345
	RegAdd ##,#__ldlcR2345
	mov R0,#STRTOSINGLE|L
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __multSingle
	RegAdd ##,#__multSingle
	pop STRTOSINGLE|L+3
	pop STRTOSINGLE|L+2
	pop STRTOSINGLE|L+1
	pop STRTOSINGLE|L
;    l := l * ten;
	line 406
	mov R0,#STRTOSINGLE|EXP+0
	call __Dec16Data
	RegAdd ##,#__Dec16Data
;    dec(exp);
	jmp &&75
&&76:
;  end;
	line 408
	mov R2,#001H
	mov A,STRTOSINGLE|SIGN
	.cjne A,R2,&&77
	mov R2,STRTOSINGLE|L
	mov R3,STRTOSINGLE|L+1
	mov R4,STRTOSINGLE|L+2
	mov R5,STRTOSINGLE|L+3
	call __NotSingle
	RegAdd ##,#__NotSingle
	mov STRTOSINGLE|L,R2
	mov STRTOSINGLE|L+1,R3
	mov STRTOSINGLE|L+2,R4
	mov STRTOSINGLE|L+3,R5
&&77:
;  if sign=1 then l:=-l;
	line 409
	mov STRTOSINGLE,STRTOSINGLE|L
	mov STRTOSINGLE+1,STRTOSINGLE|L+1
	mov STRTOSINGLE+2,STRTOSINGLE|L+2
	mov STRTOSINGLE+3,STRTOSINGLE|L+3
;  StrToSingle:=l;
&&21:
	mov R0,#STRTOSINGLE
	call __ldldR2345
	RegAdd ##,#__ldldR2345
	ret

	RegEnd ;#&STRTOSINGLE
;end;
 Endif
;{#P Endif}
;{#S-}
;{#S ASCIIShareArea}
 Ifref @SingleToStr
;{#P Ifref @SingleToStr}
;function SingleToStr(v: Single; w,d: byte): string15; 
;var
;  exp: integer;
;  s: string[20]; absolute SingleToStr;
;  decimals: byte;
	RegUse #&SINGLETOSTR
&SINGLETOSTR:
;begin
	line 421
	mov SINGLETOSTR|DECIMALS,#00H
;  decimals:=0;
	line 422
	mov R2,#000H
	mov R3,#000H
	mov R4,#000H
	mov R5,#000H
	mov R0,#SINGLETOSTR|V
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __lintequ
	RegAdd ##,#__lintequ
	.jmpz &&78
;  if v=0.0 then
;  begin
	line 424
	mov A,#030H
	push ACC
	mov A,#1
	push ACC
	mov R0,#SINGLETOSTR
	mov R2,#15
	call __popIString
	RegAdd ##,#__popIString
;    SingleToStr:='0';
;  end else
	jmp &&79
&&78:
;  begin  
	line 427
	mov SPLITSINGLE|VALUE,SINGLETOSTR|V
	mov SPLITSINGLE|VALUE+1,SINGLETOSTR|V+1
	mov SPLITSINGLE|VALUE+2,SINGLETOSTR|V+2
	mov SPLITSINGLE|VALUE+3,SINGLETOSTR|V+3
	mov A,#SINGLETOSTR|EXP+0
	mov SPLITSINGLE|EXP,A
	RegAdd ##,#&SPLITSINGLE
	call &SPLITSINGLE
	mov R0,#SPLITSINGLE
	call __pushIString
	RegAdd ##,#__pushIString
	mov R0,#SINGLETOSTR|S
	mov R2,#20
	call __popIString
	RegAdd ##,#__popIString
;    s:=SplitSingle(v,exp);
	line 428
	mov R4,#000H
	mov R5,#000H
	mov R2,SINGLETOSTR|EXP
	mov R3,SINGLETOSTR|EXP+1
	call __Intgreater
	RegAdd ##,#__Intgreater
	.jmpz &&80
;    if exp>0 then
;    begin
	line 430
	mov R0,#SINGLETOSTR|S+0
	mov A,@R0
	mov R2,A
	mov R3,#0
	mov R4,SINGLETOSTR|EXP
	mov R5,SINGLETOSTR|EXP+1
	call __AddWords
	RegAdd ##,#__AddWords
	mov R4,#008H
	mov R5,#000H
	call __Intgreater
	RegAdd ##,#__Intgreater
	.jmpz &&81
	mov R0,#SINGLETOSTR|S
	mov DPTR,#&&82
	mov R2,#20
	call __MoveStringCtoD
	RegAdd ##,#__MoveStringCtoD
;      if exp+length(s)>8 then s:='99999999' {overflow} else	
	jmp &&83
&&81:
&&84:
	line 431
	mov R4,#000H
	mov R5,#000H
	mov R2,SINGLETOSTR|EXP
	mov R3,SINGLETOSTR|EXP+1
	call __Intgreater
	RegAdd ##,#__Intgreater
	.jmpz &&85
;      while exp>0 do
;      begin
	line 433
	mov R0,#SINGLETOSTR|S
	call __pushIString
	RegAdd ##,#__pushIString
	mov A,#030H
	call __AddCharToString
	RegAdd ##,#__AddCharToString
	mov R0,#SINGLETOSTR|S
	mov R2,#20
	call __popIString
	RegAdd ##,#__popIString
	mov R0,#SINGLETOSTR|EXP+0
	call __Dec16Data
	RegAdd ##,#__Dec16Data
;        s:=s+'0'; dec(exp);
	jmp &&84
&&85:
&&83:
;      end;
;    end else
	jmp &&86
&&80:
	line 436
	mov R4,#000H
	mov R5,#000H
	mov R2,SINGLETOSTR|EXP
	mov R3,SINGLETOSTR|EXP+1
	call __Intless
	RegAdd ##,#__Intless
	.jmpz &&87
;    if exp<0 then
;    begin
	line 438
	mov R2,SINGLETOSTR|EXP
	mov R3,SINGLETOSTR|EXP+1
	call __intABS
	RegAdd ##,#__intABS
	mov R0,#SINGLETOSTR|S+0
	mov A,@R0
	mov R5,#0
	mov R4,A
	call __Intless
	RegAdd ##,#__Intless
	.jmpz &&88
;      if abs(exp)<length(s) then
;      begin
	line 440
	mov A,#02EH
	push ACC
	mov A,#1
	push ACC
	mov R0,#SINGLETOSTR|S+0
	mov A,@R0
	push ACC
	mov R2,SINGLETOSTR|EXP
	mov R3,SINGLETOSTR|EXP+1
	call __intABS
	RegAdd ##,#__intABS
	mov R5,3
	mov R4,2
	mov R3,#0
	pop 2
	call __SubWords
	RegAdd ##,#__SubWords
	mov R5,3
	mov R4,2
	mov R2,#001H
	mov R3,#000H
	call __AddWords
	RegAdd ##,#__AddWords
	mov A,R2
	mov R3,A
	mov R1,#SINGLETOSTR|S+0
	mov R2,#20
	call __DDInsert
	RegAdd ##,#__DDInsert
;        insert('.',s,length(s)-abs(exp)+1);
	line 441
	mov R0,#SINGLETOSTR|S+1
	mov A,@R0
	mov R2,#02EH
	.cjne A,R2,&&89
	mov R0,#SINGLETOSTR|S
	call __pushIString
	RegAdd ##,#__pushIString
	mov A,#030H
	call __AddStringToChar
	RegAdd ##,#__AddStringToChar
	mov R0,#SINGLETOSTR|S
	mov R2,#20
	call __popIString
	RegAdd ##,#__popIString
&&89:
;        if s[1]='.' then s:='0'+s;
;      end else
	jmp &&90
&&88:
;      begin  
	line 444
	mov R0,#SINGLETOSTR|S+0
	mov A,@R0
	mov R2,A
	mov R3,#0
	mov R4,SINGLETOSTR|EXP
	mov R5,SINGLETOSTR|EXP+1
	call __AddWords
	RegAdd ##,#__AddWords
	mov SINGLETOSTR|EXP,R2
	mov SINGLETOSTR|EXP+1,R3
;        exp:=exp+length(s);
	line 445
	mov R4,#0FAH
	mov R5,#0FFH
	mov R2,SINGLETOSTR|EXP
	mov R3,SINGLETOSTR|EXP+1
	call __Intless
	RegAdd ##,#__Intless
	.jmpz &&91
	mov A,#030H
	push ACC
	mov A,#1
	push ACC
	mov R0,#SINGLETOSTR|S
	mov R2,#20
	call __popIString
	RegAdd ##,#__popIString
;        if exp<-6 then s:='0' {Underflow} else
	jmp &&92
&&91:
;        begin
	line 447
	mov DPTR,#&&93
	call __pushCString
	RegAdd ##,#__pushCString
	mov R0,#SINGLETOSTR|S
	call __pushIString
	RegAdd ##,#__pushIString
	call __AddStrings
	RegAdd ##,#__AddStrings
	mov R0,#SINGLETOSTR|S
	mov R2,#20
	call __popIString
	RegAdd ##,#__popIString
;          s:='0.'+s;
&&94:
	line 448
	mov R4,#000H
	mov R5,#000H
	mov R2,SINGLETOSTR|EXP
	mov R3,SINGLETOSTR|EXP+1
	call __Intless
	RegAdd ##,#__Intless
	.jmpz &&95
;          while exp<0 do 
;          begin
	line 450
	mov A,#030H
	push ACC
	mov A,#1
	push ACC
	mov R3,#003H
	mov R1,#SINGLETOSTR|S+0
	mov R2,#20
	call __DDInsert
	RegAdd ##,#__DDInsert
	mov R0,#SINGLETOSTR|EXP+0
	call __Inc16Data
	RegAdd ##,#__Inc16Data
;            insert('0',s,3); inc(exp);
	jmp &&94
&&95:
;          end;  
&&92:
;        end;  
&&90:
;      end;
	line 454
	mov R0,#SINGLETOSTR|S+0
	mov A,@R0
	push ACC
	mov A,#02EH
	push ACC
	mov A,#1
	push ACC
	mov R2,#001H
	clr F0
	mov R0,#SINGLETOSTR|S+0
	call __POSN
	RegAdd ##,#__POSN
	mov R5,#0
	mov R4,A
	mov R3,#0
	pop 2
	call __SubWords
	RegAdd ##,#__SubWords
	mov A,R2
	mov SINGLETOSTR|DECIMALS,A
;      decimals:=length(s)-pos('.',s);    
&&87:
&&86:
;    end;
&&79:
;  end;
	line 457
	mov R2,#000H
	mov R3,#000H
	mov R4,#000H
	mov R5,#080H
	mov R0,#SINGLETOSTR|V
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __and32
	RegAdd ##,#__and32
	mov R2,#000H
	mov R3,#000H
	mov R4,#000H
	mov R5,#000H
	call __lintnotequ
	RegAdd ##,#__lintnotequ
	.jmpz &&96
	mov R0,#SINGLETOSTR|S
	call __pushIString
	RegAdd ##,#__pushIString
	mov A,#02DH
	call __AddStringToChar
	RegAdd ##,#__AddStringToChar
	mov R0,#SINGLETOSTR|S
	mov R2,#20
	call __popIString
	RegAdd ##,#__popIString
&&96:
;  if Longint(v) and $80000000<>0 then s:='-'+s;
	line 458
	mov R2,#008H
	mov A,SINGLETOSTR|D
	clr C
	subb A,R2
	.jmpnc &&97
;  if d<8 then
;  begin
	line 460
	mov A,SINGLETOSTR|DECIMALS
	.jmpnz &&98
;    if decimals=0 then
;    begin
	line 462
	mov R2,#000H
	mov A,SINGLETOSTR|D
	clr C
	subb A,R2
	.jmpz &&99
	.jmpc &&99
	mov R0,#SINGLETOSTR|S
	call __pushIString
	RegAdd ##,#__pushIString
	mov A,#02EH
	call __AddCharToString
	RegAdd ##,#__AddCharToString
	mov R0,#SINGLETOSTR|S
	mov R2,#20
	call __popIString
	RegAdd ##,#__popIString
&&99:
;      if d>0 then s:=s+'.';
&&100:
	line 463
	mov R2,#000H
	mov A,SINGLETOSTR|D
	clr C
	subb A,R2
	.jmpz &&101
	.jmpc &&101
;      while d>0 do
;      begin
	line 465
	mov R0,#SINGLETOSTR|S
	call __pushIString
	RegAdd ##,#__pushIString
	mov A,#030H
	call __AddCharToString
	RegAdd ##,#__AddCharToString
	mov R0,#SINGLETOSTR|S
	mov R2,#20
	call __popIString
	RegAdd ##,#__popIString
	mov R0,#SINGLETOSTR|D+0
	dec @R0
;        s:=s+'0'; dec(d);
	jmp &&100
&&101:
;      end;
;    end else
	jmp &&102
&&98:
;    begin
	line 469
	mov R2,SINGLETOSTR|DECIMALS
	mov A,SINGLETOSTR|D
	clr C
	subb A,R2
	.jmpnc &&103
;      if d<decimals then
;      begin 
	line 471
	mov A,#SINGLETOSTR|S+0
	mov ROUNDSTR|S,A
	mov ROUNDSTR|D,SINGLETOSTR|D
	RegAdd ##,#&ROUNDSTR
	call &ROUNDSTR
	.jmpz &&104
	mov R0,#SINGLETOSTR|S
	call __pushIString
	RegAdd ##,#__pushIString
	mov A,#031H
	call __AddStringToChar
	RegAdd ##,#__AddStringToChar
	mov R0,#SINGLETOSTR|S
	mov R2,#20
	call __popIString
	RegAdd ##,#__popIString
&&104:
;        if RoundStr(s,d) then s:='1'+s;
;      end else 
	jmp &&105
&&103:
&&106:
	line 473
	mov R2,SINGLETOSTR|D
	mov A,SINGLETOSTR|DECIMALS
	clr C
	subb A,R2
	.jmpnc &&107
;      while decimals<d do 
;      begin
	line 475
	mov R0,#SINGLETOSTR|S
	call __pushIString
	RegAdd ##,#__pushIString
	mov A,#030H
	call __AddCharToString
	RegAdd ##,#__AddCharToString
	mov R0,#SINGLETOSTR|S
	mov R2,#20
	call __popIString
	RegAdd ##,#__popIString
	mov R0,#SINGLETOSTR|DECIMALS+0
	inc @R0
;        s:=s+'0'; inc(decimals);
	jmp &&106
&&107:
&&105:
;      end;
	line 477
	mov R0,#SINGLETOSTR|S+0
	mov A,@R0
	add a,#SINGLETOSTR|S+0
	mov R0,a
	mov A,@R0
	mov R2,#02EH
	.cjne A,R2,&&108
	mov R0,#SINGLETOSTR|S+0
	dec @R0
&&108:
;      if s[length(s)]='.' then dec(s[0]);	
&&102:
;    end;
&&97:
;  end;
	line 480
	mov R2,#014H
	mov A,SINGLETOSTR|W
	clr C
	subb A,R2
	.jmpz &&109
	.jmpc &&109
	mov SINGLETOSTR|W,#14H
&&109:
;  if w>20 then w:=20;
	line 481
	mov R2,#000H
	mov A,SINGLETOSTR|W
	clr C
	subb A,R2
	.jmpz &&110
	.jmpc &&110
&&111:
	mov R0,#SINGLETOSTR|S+0
	mov A,@R0
	mov R2,SINGLETOSTR|W
	clr C
	subb A,R2
	.jmpnc &&112
	mov R0,#SINGLETOSTR|S
	call __pushIString
	RegAdd ##,#__pushIString
	mov A,#020H
	call __AddStringToChar
	RegAdd ##,#__AddStringToChar
	mov R0,#SINGLETOSTR|S
	mov R2,#20
	call __popIString
	RegAdd ##,#__popIString
	jmp &&111
&&112:
&&110:
;  if w>0 then while length(s)<w do s:=' '+s;
&&22:
	ret

	RegEnd ;#&SINGLETOSTR
;end;
 endif
;{#P endif}
;{#S ASCIIShareArea}
 ifref @SingleToScientific
;{#P ifref @SingleToScientific}
;function SingleToScientific(v: Single): string15; 
;var
;  exp: integer;
;  s: string[20]; absolute SingleToScientific;
;  i: byte;
	RegUse #&SINGLETOSCIENTIFIC
&SINGLETOSCIENTIFIC:
;begin
	line 492
	mov R2,#000H
	mov R3,#000H
	mov R4,#000H
	mov R5,#000H
	mov R0,#SINGLETOSCIENTIFIC|V
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __lintequ
	RegAdd ##,#__lintequ
	.jmpz &&113
;  if v=0.0 then
;  begin
	line 494
	mov R0,#SINGLETOSCIENTIFIC
	mov DPTR,#&&114
	mov R2,#15
	call __MoveStringCtoD
	RegAdd ##,#__MoveStringCtoD
	jmp &&23
;    SingleToScientific:='0.0E+00'; exit;
&&113:
;  end;  
	line 496
	mov SPLITSINGLE|VALUE,SINGLETOSCIENTIFIC|V
	mov SPLITSINGLE|VALUE+1,SINGLETOSCIENTIFIC|V+1
	mov SPLITSINGLE|VALUE+2,SINGLETOSCIENTIFIC|V+2
	mov SPLITSINGLE|VALUE+3,SINGLETOSCIENTIFIC|V+3
	mov A,#SINGLETOSCIENTIFIC|EXP+0
	mov SPLITSINGLE|EXP,A
	RegAdd ##,#&SPLITSINGLE
	call &SPLITSINGLE
	mov R0,#SPLITSINGLE
	call __pushIString
	RegAdd ##,#__pushIString
	mov R0,#SINGLETOSCIENTIFIC|S
	mov R2,#20
	call __popIString
	RegAdd ##,#__popIString
;  s:=SplitSingle(v,exp);
	line 497
	mov R0,#SINGLETOSCIENTIFIC|S+0
	mov A,@R0
	mov R2,A
	mov R3,#0
	mov R4,SINGLETOSCIENTIFIC|EXP
	mov R5,SINGLETOSCIENTIFIC|EXP+1
	call __AddWords
	RegAdd ##,#__AddWords
	mov R4,#001H
	mov R5,#000H
	call __SubWords
	RegAdd ##,#__SubWords
	mov SINGLETOSCIENTIFIC|EXP,R2
	mov SINGLETOSCIENTIFIC|EXP+1,R3
;  exp:=exp+length(s)-1;
	line 498
	mov A,#02EH
	push ACC
	mov A,#1
	push ACC
	mov R3,#002H
	mov R1,#SINGLETOSCIENTIFIC|S+0
	mov R2,#20
	call __DDInsert
	RegAdd ##,#__DDInsert
	mov R0,#SINGLETOSCIENTIFIC|S+0
	mov A,@R0
	mov R2,#002H
	.cjne A,R2,&&115
	mov R0,#SINGLETOSCIENTIFIC|S
	call __pushIString
	RegAdd ##,#__pushIString
	mov A,#030H
	call __AddCharToString
	RegAdd ##,#__AddCharToString
	mov R0,#SINGLETOSCIENTIFIC|S
	mov R2,#20
	call __popIString
	RegAdd ##,#__popIString
&&115:
;  Insert('.',s,2); If length(s)=2 then s:=s+'0';
	line 499
	mov R0,#SINGLETOSCIENTIFIC|S
	call __pushIString
	RegAdd ##,#__pushIString
	mov A,#045H
	call __AddCharToString
	RegAdd ##,#__AddCharToString
	mov R0,#SINGLETOSCIENTIFIC|S
	mov R2,#20
	call __popIString
	RegAdd ##,#__popIString
;  s:=s+'E';
	line 500
	mov R2,#000H
	mov R3,#000H
	mov R4,#000H
	mov R5,#080H
	mov R0,#SINGLETOSCIENTIFIC|V
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __and32
	RegAdd ##,#__and32
	mov R2,#000H
	mov R3,#000H
	mov R4,#000H
	mov R5,#000H
	call __lintnotequ
	RegAdd ##,#__lintnotequ
	.jmpz &&116
	mov R0,#SINGLETOSCIENTIFIC|S
	call __pushIString
	RegAdd ##,#__pushIString
	mov A,#02DH
	call __AddStringToChar
	RegAdd ##,#__AddStringToChar
	mov R0,#SINGLETOSCIENTIFIC|S
	mov R2,#20
	call __popIString
	RegAdd ##,#__popIString
&&116:
;  if Longint(v) and $80000000<>0 then s:='-'+s;
	line 501
	mov R0,#SINGLETOSCIENTIFIC|S
	call __pushIString
	RegAdd ##,#__pushIString
	mov R2,SINGLETOSCIENTIFIC|EXP
	mov R3,SINGLETOSCIENTIFIC|EXP+1
	call __IntToStr
	RegAdd ##,#__IntToStr
	call __AddStrings
	RegAdd ##,#__AddStrings
	mov R0,#SINGLETOSCIENTIFIC|S
	mov R2,#20
	call __popIString
	RegAdd ##,#__popIString
;  s:=s+IntToStr(exp);
&&23:
	ret

	RegEnd ;#&SINGLETOSCIENTIFIC
;end;
 Endif
;{#P Endif}
;{#S-}
;{#S ASCIIShareArea}
 ifref @Random
;{#P ifref @Random}
;function Random(Range: Longint): Longint; 
	RegUse #&RANDOM
&RANDOM:
;begin
	line 509
	mov R2,RANDSEED
	mov R3,RANDSEED+1
	mov R4,RANDSEED+2
	mov R5,RANDSEED+3
	call __PushLintLiteral
	RegAdd ##,#__PushLintLiteral
	DL 8088405H
	call __mult32
	RegAdd ##,#__mult32
	mov R2,#001H
	mov R3,#000H
	mov R4,#000H
	mov R5,#000H
	call __Add32
	RegAdd ##,#__Add32
	pop RANDSEED+3
	pop RANDSEED+2
	pop RANDSEED+1
	pop RANDSEED
;  RandSeed:=$8088405*RandSeed+1;
	line 510
	mov R2,#000H
	mov R3,#000H
	mov R4,#000H
	mov R5,#000H
	mov R0,#RANDOM|RANGE
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __lintequ
	RegAdd ##,#__lintequ
	.jmpz &&117
;  if Range=0 then 
;  begin
	line 512
	mov RANDOM,#00H
	mov RANDOM+1,#00H
	mov RANDOM+2,#00H
	mov RANDOM+3,#00H
	jmp &&24
;    Random:=0; exit;
&&117:
;  end;
	line 514
	mov R2,RANDOM|RANGE
	mov R3,RANDOM|RANGE+1
	mov R4,RANDOM|RANGE+2
	mov R5,RANDOM|RANGE+3
	mov R0,#RANDSEED
	call __PushLintData
	RegAdd ##,#__PushLintData
	call __mod32
	RegAdd ##,#__mod32
	pop RANDOM+3
	pop RANDOM+2
	pop RANDOM+1
	pop RANDOM
;  Random:=RandSeed mod Range;
&&24:
	mov R0,#RANDOM
	call __ldldR2345
	RegAdd ##,#__ldldR2345
	ret

	RegEnd ;#&RANDOM
;end;
 Endif
;{#P Endif}
;{#S-}
&&S0:
	RegUse &&S0
	mov R0,DO_POLY|D
	mov A,DO_POLY|N
	mov B,#4
	mul AB
	add A,R0
	mov R0,a
	ret
	RegEnd
&&93:
	DB 2
	DB '0.'
&&114:
	DB 7
	DB '0.0E+00'
&&82:
	DB 8
	DB '99999999'


	DATA

FPHLIB|P0	DEF 0080H
FPHLIB|SP	DEF 0081H
FPHLIB|DPL	DEF 0082H
FPHLIB|DPH	DEF 0083H
FPHLIB|DPTR	DEF 0082H
FPHLIB|PCON	DEF 0087H
FPHLIB|TCON	DEF 0088H
FPHLIB|TMOD	DEF 0089H
FPHLIB|TL0	DEF 008AH
FPHLIB|TL1	DEF 008BH
FPHLIB|TH0	DEF 008CH
FPHLIB|TH1	DEF 008DH
FPHLIB|P1	DEF 0090H
FPHLIB|SCON	DEF 0098H
FPHLIB|SBUF	DEF 0099H
FPHLIB|P2	DEF 00A0H
FPHLIB|IE	DEF 00A8H
FPHLIB|P3	DEF 00B0H
FPHLIB|IP	DEF 00B8H
FPHLIB|PSW	DEF 00D0H
FPHLIB|ACC	DEF 00E0H
FPHLIB|B	DEF 00F0H
FPHLIB|T2CON	DEF 00C8H
FPHLIB|TL2	DEF 00CCH
FPHLIB|TH2	DEF 00CDH
FPHLIB|RCAP2L	DEF 00CAH
FPHLIB|RCAP2H	DEF 00CBH
FPHLIB|P0_0	DEF 0080H
FPHLIB|P0_1	DEF 0081H
FPHLIB|P0_2	DEF 0082H
FPHLIB|P0_3	DEF 0083H
FPHLIB|P0_4	DEF 0084H
FPHLIB|P0_5	DEF 0085H
FPHLIB|P0_6	DEF 0086H
FPHLIB|P0_7	DEF 0087H
FPHLIB|IT0	DEF 0088H
FPHLIB|IE0	DEF 0089H
FPHLIB|IT1	DEF 008AH
FPHLIB|IE1	DEF 008BH
FPHLIB|TR0	DEF 008CH
FPHLIB|TF0	DEF 008DH
FPHLIB|TR1	DEF 008EH
FPHLIB|TF1	DEF 008FH
FPHLIB|P1_0	DEF 0090H
FPHLIB|P1_1	DEF 0091H
FPHLIB|P1_2	DEF 0092H
FPHLIB|P1_3	DEF 0093H
FPHLIB|P1_4	DEF 0094H
FPHLIB|P1_5	DEF 0095H
FPHLIB|P1_6	DEF 0096H
FPHLIB|P1_7	DEF 0097H
FPHLIB|RI	DEF 0098H
FPHLIB|TI	DEF 0099H
FPHLIB|RB8	DEF 009AH
FPHLIB|TB8	DEF 009BH
FPHLIB|REN	DEF 009CH
FPHLIB|SM2	DEF 009DH
FPHLIB|SM1	DEF 009EH
FPHLIB|SM0	DEF 009FH
FPHLIB|P2_0	DEF 00A0H
FPHLIB|P2_1	DEF 00A1H
FPHLIB|P2_2	DEF 00A2H
FPHLIB|P2_3	DEF 00A3H
FPHLIB|P2_4	DEF 00A4H
FPHLIB|P2_5	DEF 00A5H
FPHLIB|P2_6	DEF 00A6H
FPHLIB|P2_7	DEF 00A7H
FPHLIB|EX0	DEF 00A8H
FPHLIB|ET0	DEF 00A9H
FPHLIB|EX1	DEF 00AAH
FPHLIB|ET1	DEF 00ABH
FPHLIB|ES	DEF 00ACH
FPHLIB|ET2	DEF 00ADH
FPHLIB|EA	DEF 00AFH
FPHLIB|P3_0	DEF 00B0H
FPHLIB|P3_1	DEF 00B1H
FPHLIB|P3_2	DEF 00B2H
FPHLIB|P3_3	DEF 00B3H
FPHLIB|P3_4	DEF 00B4H
FPHLIB|P3_5	DEF 00B5H
FPHLIB|P3_6	DEF 00B6H
FPHLIB|P3_7	DEF 00B7H
FPHLIB|X0	DEF 00B8H
FPHLIB|PT0	DEF 00B9H
FPHLIB|PX1	DEF 00BAH
FPHLIB|PT1	DEF 00BBH
FPHLIB|PS	DEF 00BCH
FPHLIB|PT2	DEF 00BDH
FPHLIB|P	DEF 00D0H
FPHLIB|F1	DEF 00D1H
FPHLIB|OV	DEF 00D2H
FPHLIB|RS0	DEF 00D3H
FPHLIB|RS1	DEF 00D4H
FPHLIB|F0	DEF 00D5H
FPHLIB|AC	DEF 00D6H
FPHLIB|CY	DEF 00D7H
FPHLIB|CPRL2	DEF 00C8H
FPHLIB|CT2	DEF 00C9H
FPHLIB|TR2	DEF 00CAH
FPHLIB|EXEN2	DEF 00CBH
FPHLIB|TCLK	DEF 00CCH
FPHLIB|RCLK	DEF 00CDH
FPHLIB|EXF2	DEF 00CEH
FPHLIB|TF2	DEF 00CFH
FPHLIB|STARTUP_VECTOR	DEF 0000H
FPHLIB|INT_INT0_VECTOR	DEF 0003H
FPHLIB|INT_TF0_VECTOR	DEF 000BH
FPHLIB|INT_INT1_VECTOR	DEF 0013H
FPHLIB|INT_TF1_VECTOR	DEF 001BH
FPHLIB|INT_SERIAL_VECTOR	DEF 0023H
FPHLIB|INT_TF2_VECTOR	DEF 002BH
FPHLIB|FIRSTCODELOCATION	DEF 002EH
	DATA
SIN:	DS 4
SIN|F:	DS 4
SIN|RESULT	EQU SIN
COS:	DS 4
COS|F:	DS 4
COS|RESULT	EQU COS
TAN:	DS 4
TAN|F:	DS 4
TAN|RESULT	EQU TAN
ARCTAN:	DS 4
ARCTAN|F:	DS 4
ARCTAN|RESULT	EQU ARCTAN
SQR:	DS 4
SQR|F:	DS 4
SQR|RESULT	EQU SQR
SQRT:	DS 4
SQRT|F:	DS 4
SQRT|RESULT	EQU SQRT
LN:	DS 4
LN|F:	DS 4
LN|RESULT	EQU LN
LOG10:	DS 4
LOG10|F:	DS 4
LOG10|RESULT	EQU LOG10
EXP:	DS 4
EXP|F:	DS 4
EXP|RESULT	EQU EXP
POWER:	DS 4
POWER|X:	DS 4
POWER|Y:	DS 4
POWER|RESULT	EQU POWER
FRAC:	DS 4
FRAC|X:	DS 4
FRAC|RESULT	EQU FRAC
ARCSIN:	DS 4
ARCSIN|F:	DS 4
ARCSIN|RESULT	EQU ARCSIN
ARCCOS:	DS 4
ARCCOS|F:	DS 4
ARCCOS|RESULT	EQU ARCCOS
SINH:	DS 4
SINH|F:	DS 4
SINH|RESULT	EQU SINH
COSH:	DS 4
COSH|F:	DS 4
COSH|RESULT	EQU COSH
TANH:	DS 4
TANH|F:	DS 4
TANH|RESULT	EQU TANH
STRTOSINGLE:	DS 4
STRTOSINGLE|INPUT:	DS 16
STRTOSINGLE|RESULT	EQU STRTOSINGLE
SINGLETOSTR:	DS 16
SINGLETOSTR|V:	DS 4
SINGLETOSTR|W:	DS 1
SINGLETOSTR|D:	DS 1
SINGLETOSTR|RESULT	EQU SINGLETOSTR
SINGLETOSCIENTIFIC:	DS 16
SINGLETOSCIENTIFIC|V:	DS 4
SINGLETOSCIENTIFIC|RESULT	EQU SINGLETOSCIENTIFIC
RANDOM:	DS 4
RANDOM|RANGE:	DS 4
RANDOM|RESULT	EQU RANDOM
RANDSEED:	DS 4
ASCIISHAREAREA:	DS 41
MATHSHAREAREA:	DS 17
MATH2SHAREAREA:	DS 8
MATH3SHAREAREA:	DS 8
DO_POLY	EQU ASCIISHAREAREA+0
DO_POLY|X	EQU ASCIISHAREAREA+4
DO_POLY|D	EQU ASCIISHAREAREA+8
DO_POLY|N	EQU ASCIISHAREAREA+9
DO_POLY|RESULT	EQU DO_POLY
DO_POLY|RES	EQU ASCIISHAREAREA+10
SIN|Y:	DS 4
SIN|YSQ:	DS 4
SIN|SECT:	DS 2
SIN|E:	DS 2
ARCTAN|REC	EQU MATHSHAREAREA+14
ARCTAN|VAL	EQU MATHSHAREAREA+15
ARCTAN|VALSQ	EQU MATHSHAREAREA+19
SQRT|EXP	EQU ASCIISHAREAREA+0
SQRT|N	EQU ASCIISHAREAREA+2
SQRT|V1	EQU ASCIISHAREAREA+3
SQRT|V2	EQU ASCIISHAREAREA+7
LN|EXP	EQU MATHSHAREAREA+0
EXP|EX	EQU MATHSHAREAREA+2
EXP|SIGN	EQU MATHSHAREAREA+4
STRTOSINGLE|SIGN	EQU ASCIISHAREAREA+0
STRTOSINGLE|EXPSIGN	EQU ASCIISHAREAREA+1
STRTOSINGLE|EXP	EQU ASCIISHAREAREA+2
STRTOSINGLE|EEXP	EQU ASCIISHAREAREA+4
STRTOSINGLE|W	EQU ASCIISHAREAREA+6
STRTOSINGLE|L	EQU ASCIISHAREAREA+10
STRTOSINGLE|S	EQU ASCIISHAREAREA+14
SINGLETOSTR|EXP	EQU ASCIISHAREAREA+0
SINGLETOSTR|S	EQU SINGLETOSTR
SINGLETOSTR|DECIMALS	EQU ASCIISHAREAREA+2
SINGLETOSCIENTIFIC|EXP	EQU ASCIISHAREAREA+0
SINGLETOSCIENTIFIC|S	EQU SINGLETOSCIENTIFIC
SINGLETOSCIENTIFIC|I	EQU ASCIISHAREAREA+2

	END

