beautypg.com

ProSoft Technology MVI56-BAS User Manual

Page 112

background image

BASIC CALLs Syntax

MVI56-BAS ♦ ControlLogix Platform

User Manual

BASIC Module (DB/BAS Compatible)

Page 112 of 234

ProSoft Technology, Inc.

December 13, 2011

CALL 88: Convert BASIC Floating Point Data to CLX Floating Point

CALL 88 converts a BASIC floating point data value to a CLX floating point value

and places the result into the module output buffer. If the value to be converted is

less than 1.1754944E-38, then 1.1754944E-38 will be used. If the value to be

converted is greater than 3.4028237E38, then 3.4028237E38 will be used. No

error will be generated in either case. Because the CLX floating point format

requires two words, the offset in the BASIC Input Buffer is limited to even values.

Odd offset values will generate an error.

Syntax:

PUSH [A]
PUSH [B]
CALL 25

Where:
A = value to be converted
B = word address of output buffer (between 0 and 230, even values only!)

Example:

10 DIM A(16)
.
.
.
210 GOSUB 720
.
.
700 REM This routine copies data from variable A()
710 REM to the BASIC Output Buffer Input Image area
720 FOR I = 0 TO 15
730 PUSH A(I),I*2+200: CALL 88
740 NEXT I
750 RETURN