DBC Compatibility Mode


 

The PLBCMP compiler (PLBCMP.PLC) provides a compatibility mode for source created for the Subject and Wills DBC product. This mode is enabled by use of the "-ZC=3" compiler switch.

 

  1. The DBC Support provides the following additional statement syntax formats.

 

DimArray

DIM

6[3],INITIAL "123","abc","xyz"

FormArray

FORM

6[3],INITIAL 1,2,3

IntArray

INTEGER

[3],INITIAL 1,2,3

.

 

 

Int

INTEGER

"123"

TypeLess

VAR

@

TypeLessArr

VAR

[3]@

.

 

 

DimPtr

DIM

@

DimAr

DIM

[3]@

DimArrPtr

DIM

@[]

Dim2ArrPtr

DIM

@[,]

Dim3ArrPtr

DIM

@[,,]

.

 

 

 

TYPE

TypeLess TYP,DZ1,DZ2,DZ3

 

MOVEADR

TypeLess,DimPtr

 

MOVEPTR

TypeLess,DimPtr

 

CALL

XXX USING DimArray

.

 

 

XXX

ROUTINE

DimArrPtr

 

RETURN

 

.

 

 

YYY

ROUTINE

TypeLess

 

RETURN

 

 

  1. The DIM variable supports the following alternate statement syntax formats:

 

(1)

[label]

DIM

[*][%]{size}({arraysize}), INITIAL "????", ...

(2)

[label]

DIM

({arraysize})@

(3)

[label]

DIM

@()

(4)

[label]

DIM

@(,)

(5)

[label]

DIM

@(,,)

 

Examples:

 

DimArray

DIM

6[3],INITIAL "123","abc","xyz"

DimArr

DIM

[3]@ ;Array of 3 pointers

DimArrPtr

DIM

@[] ;Array Pointer 1 dimension

Dim2ArrPtr

DIM

@[,] ;Array Pointer 2 dimensions

Dim3ArrPtr

DIM

@[,,] ;Array Pointer 3 dimensions

.

 

 

 

MOVEADR

DimArray, DimArrPtr

 

DISPLAY

DimArrPtr(2)

 

  1. The FORM variable supports the following alternate statement syntax formats:

 

(1)

[label]

FORM

[*][%]{size}({arraysize}), INITIAL {dvalue}, ..

(2)

[label]

FORM

({arraysize})@

(3)

[label]

FORM

@()

(4)

[label]

FORM

@(,)

(5)

[label]

FORM

@(,,)

 

Examples:

 

FormArray

FORM

2.2[3],INITIAL 1.5,2.5,3.5

FormArr

FORM

[3]@ ;Array of 3 pointers

FormArrPtr

FORM

@[] ;Array Pointer 1 dimension

Form2ArrPtr

FORM

@[,] ;Array Pointer 2 dimensions

Form3ArrPtr

FORM

@[,,] ;Array Pointer 3 dimensions

 

  1. The INTEGER variable has been modified to support the following alternate statement syntax formats:

 

(1)

[label]

INTEGER

[*][%]{size}({arraysize}), INITIAL {dvalue}, ...

(2)

[label]

INTEGER

({arraysize})@

(3)

[label]

INTEGER

@()

(4)

[label]

INTEGER

@(,)

(5)

[label]

INTEGER

@(,,)

(6)

[label]

INTEGER

{value}

 

Examples:

 

IntArray

INTEGER

[3],INITIAL 1,2,3

IntArr

INTEGER

[3]@ ;Array of 3 pointers

IntArrPtr

INTEGER

@[] ;Array Pointer 1 dimension

Int2ArrPtr

INTEGER

@[,] ;Array Pointer 2 dimensions

Int3ArrPtr

INTEGER

 @[,,] ;Array Pointer 3 dimensions

Int

INTEGER

"123" ;Default to 4 byte integer

 

  1. The VAR variable is a new language declaration statement that declares a typeless data variable pointer. A typeless variable can contain the address of any PL/B language variable. The typeless variable can only be declared when the compiler 'ZC=3' option is used. Also, it can only be used as an operand variable in ROUTINE, LROUTINE, MOVEADR, MOVEPTR, TYPE, CLEARADR, LOADADR, and STOREADR statements.

Syntax:

 

[label]

VAR

@

[label]

VAR

[{arraysize}]@

Example:

 

TypeLess

VAR

@

TypeLessArr

VAR

[3]@

DimX

INIT

"ABC"

FormX

FORM

"123.456"

IntX

INTEGER

1,"256"

XType

INTEGER

4

DimPtr

DIM

@

FormPtr

FORM

@

IntPtr

INTEGER

@

$08h

INTEGER

1,"0x8"

$10h

INTEGER

1,"0x10"

$20h

INTEGER

1,"0x20"

.

 

 

 

CALL

CHKVAR USING DimX

 

CALL

CHKVAR USING FormX

 

CALL

CHKVAR USING IntX

 

STOP

 

.

 

 

CHKVAR

ROUTINE

TypeLess

 

TYPE

TypeLess,XType

 

AND

0xFF,XType

 

SWITCH

XType

 

CASE

$20h

 

MOVEADR

TypeLess,DimPtr

 

DISPLAY

"DIM:",*LL,DimPtr

  

 

 

 

CASE

10h

 

MOVEADR

TypeLess,FormPtr

 

DISPLAY

"FORM:",FormPtr

  

 

 

 

CASE

$08h

 

MOVEADR

TypeLess,IntPtr

 

DISPLAY

"INTEGER:",IntPtr

  

 

 

 

DEFAULT

 

 

DISPLAY

"Input Variable Type Invalid!"

  

 

 

 

ENDSWITCH

 

 

RETURN

 

 

  1. The MOVEADR (MOVEADDR) statement has been modified to allow a VAR typeless variable or ARRAY POINTER variable in the source and destination operands. An example of this statement is included in item 5 above.

  2. The MOVEPTR statement has been modified to allow a VAR typeless variable or ARRAY POINTER variable in the source and destination operands.

  3. The ROUTINE and LROUTINE variable list has been modified to allow a VAR typeless variable or ARRAY POINTER as valid variables. An example of this statement is included in item 5 above.

  4. The TYPE statement has been modified to accept an alternate syntax format. A detailed discussion of the TYPE instruction is located in the PL/B Reference file. An example of this statement is included in item 5 above.

  5. Syntax

 

[label]

TYPE

{var}[,{type}[,Dim1[,Dim2[,Dim3]]]]

 

 

See Also: PLBCMP Command Line Syntax, PLBCMP Keywords, PLBWIN INI File Format, Compiler and Runtime Options

 



Compiler and Runtime Options PLBCMP Keywords