Download Documentation for Pic Micro Pascal
Transcript
PIC MICRO PASCAL V1.6 - USER MANUAL
3.7.3
$DEPRECATED – Define a unit, procedure or function as obsolete
<Message>
Define the current unit, procedure or function as obsolete. If it is used, the compiler will output a warning
with the given <Message> (quoted string).
Example:
{$DEPRECATED 'This procedure is kept for compatibility, use XYZ instead' }
3.7.4
$EEPROM - Define useable EEPROM area
<Address expression> [TO <Address expression>]
Defines EEPROM memory area to use for variables that will be allocated after this point (default is all
available EEPROM). The first parameter defines only the EEPROM start area, the optional second
parameter defines EEPROM top too (last usable address). This directive is local to the current module.
Example:
{$EEPROM $10 TO $FF }
3.7.5
// $0 to $0F reserved for direct use
$EOL – Define end of line behavior
CR | CRLF
Defines behavior for end of line in WRITELN. CR puts only a CR ($0D), and CRLF (default) puts a CR
and LF pair ($0D-$0A). If this directive is present before a USES statement, it propagates to the used
units. For READLN, CR only matters and LF characters are ignored.
Example:
{$EOL CR }
3.7.6
$EXTENDED – Enable / disable extended Pascal syntax - NEW! (V1.6.0)
ON | OFF
Tell the compiler to enable or disable some non-standard Pascal syntax. Default is ON.
If the extended syntax is enabled PMP implements some nice features taken from other Pascal-like
languages such as MODULA or OBERON. These extended syntax are:
✔ A BY clause in the FOR loop statement,
✔ A LOOP... END statement,
✔ A RETURN statement in functions.
✔ An ELSEIF statement for the IF statement.
Example:
{$EXTENDED OFF }
3.7.7
// Standard Pascal
$FREQUENCY - Processor frequency
<frequency>
Defines processor operating frequency; this directive overrides the default frequency defined in the
Project Options form. For the command line version of PMP, it may be defined on command line
arguments (or defaults to 4 MHz). This directive is not allowed in units since they use main program
declaration. A frequency multiplier can be used (4000 KHz, 8 MHz …), but dots are not allowed (4.5 MHz
is forbidden, use 4500 KHz instead). Case is not sensitive (since mHz should not be 1/1000 th of Hertz!). A
CONST pseudo variable named FREQUENCY is generated that holds the value and may be used in
expressions.
Example:
{$IFDEF LOW_POWER}
{$FREQUENCY 31000}
{$ELSE}
{$FREQUENCY 20 MHz}
{$ENDIF}
Document revision: A
LANGUAGE
F E AT U R E S
- DIRECTIVES
Page 28/101