  Example of floating-point Macro32 calls? 
 The Question is:
 
hey Wiz: would you happen to have source code in vax macro assembly that
 converts input ascii string of a floating point to .f_floating format.
 
 The Answer is :
There are numerous RTL routines for converting between text and various
floating point formats, all useable from any language. Here is one example
coded in MACRO32:
 
	.TITLE Text2F_FLOAT
	.PSECT data,RD,WRT,NOEXE
f_val:  .FLOAT
exten:  .BYTE	; extension bits return
string: .ASCID /123.456/
	.PSECT code,RD,NOWRT,EXE
	.ENTRY Start,^M&lt;&gt;
	PUSHAB	exten	; optional extension bits argument
	PUSHL   #0	; flags all clear (default)
	PUSHL   #0	; ignore scale factor
	PUSHL	#0	; digits in fraction (unnecessary)
	PUSHAF  f_val	; return F_FLOAT value
	PUSHAB  string	; input text string
	CALLS  #6, G^OTS$CVT_T_F
	RET
	.END Start
 
or, minimally:
 
	.TITLE Text2F_FLOAT
	.PSECT data,RD,WRT,NOEXE
f_val:  .FLOAT
string: .ASCID /123.456/
	.PSECT code,RD,NOWRT,EXE
	.ENTRY Start,^M&lt;&gt;
	PUSHAF  f_val	; return F_FLOAT value
	PUSHAB  string	; input text string
	CALLS  #2, G^OTS$CVT_T_F
	RET
	.END Start
 
See:
 
OpenVMS RTL General Purpose (OTS$) Manual
Order Number: AA--PV6HD--TK
 
 Answer written or last revised on  11-MAY-2003 
