28.11.2012 Views

Table of Contents - TG Drives

Table of Contents - TG Drives

Table of Contents - TG Drives

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

PL2 NATIVE POSITION LANGUAGE<br />

Compiler directives<br />

Function: The error string is printed to the list file<br />

output.<br />

.ORG Format: .ORG const [; Comment]<br />

Function: Sets the location counter to the value <strong>of</strong> the<br />

const so that next output record is generated<br />

at line const.<br />

Warnings: If code is overwritten because <strong>of</strong> the .org<br />

directive, a warning is generated.<br />

Error: If const results in a value that is not within<br />

the memory range for this controller<br />

configuration, an error is generated.<br />

.LINESTEP Format: .LINESTEP const [; Comment]<br />

.DEFINE Format:<br />

Function: Sets the incremented location counter<br />

values between each generated line; the<br />

default is 1.<br />

Its purpose is to simplify debugging by<br />

allowing space between the lines. For<br />

maximum execution speed, use<br />

’.LINESTEP 1’.<br />

Warnings: None<br />

Error: If, during code generation, all memory for<br />

this controller configuration is used, an<br />

error is generated.<br />

.DEFINE Vsymbol = const<br />

.DEFINE Vsymbol = const_expr<br />

.DEFINE Rsymbol = reg<br />

.DEFINE Xsymbol = xreg<br />

.DEFINE Isymbol = indirect_reg<br />

[; Comment]<br />

[; Comment]<br />

[; Comment]<br />

[; Comment]<br />

[; Comment]<br />

Function: Defines a symbol as an alias for a constant<br />

expression, constant, register, extended register or<br />

indirect register. A constant expression is first<br />

evaluated to a const. The symbol has the same<br />

value and type as the right-hand side.<br />

Warnings: None<br />

Error: If the right-hand side cannot be evaluated, an error<br />

is generated.<br />

.UNDEFINE Format: .UNDEFINE XSYMBOL<br />

Function: Undefine a symbol in the compiler so that it can be<br />

redefined.<br />

.BYTE Format: .BYTE const1, const2., const5 [; Comment]<br />

Function: Primarily intended to allow an older version <strong>of</strong><br />

the compiler to generate code for<br />

unimplemented program statements.<br />

.MACRO NEWINSTR a, b, c<br />

.BYTE 123, 34, a, b, c<br />

.ENDMACRO<br />

User's Manual 5.1 Inmotion Technologies AB<br />

Doc. No.9032 0027 01 (B), Rev. 11.07.2001<br />

33

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!