$REGFILE
(Created page with "= <span class="f_Header">Action</span> = Instruct the compiler to use the specified register file instead of the selected dat file. <span style="font-family: Arial;"> <...") |
|||
Line 45: | Line 45: | ||
<span style="font-family: Arial;"> </span> | <span style="font-family: Arial;"> </span> | ||
− | [[File:Notice.jpg|left]] It is good practice to use the $REGFILE directive. It has the advantage that you can see at the source which chip it was written for. The $REGFILE directive is also needed when the [ | + | [[File:Notice.jpg|left|Notice.jpg]] It is good practice to use the $REGFILE directive. It has the advantage that you can see at the source which chip it was written for. The $REGFILE directive is also needed when the [[View_PinOut|PinOut]] viewer or the [[View_PDF_Viewer|PDF]] viewer is used. |
<span style="font-family: Arial;"> </span> | <span style="font-family: Arial;"> </span> | ||
Line 53: | Line 53: | ||
<span style="font-family: Arial;"> </span> | <span style="font-family: Arial;"> </span> | ||
− | Example : | + | Example : |
<span style="font-style: italic;">DIM PORTA As Byte</span> | <span style="font-style: italic;">DIM PORTA As Byte</span> | ||
Line 65: | Line 65: | ||
= <span class="f_Header">See also</span> = | = <span class="f_Header">See also</span> = | ||
− | [[$SWSTACK]] , [[$HWSTACK]] , [[$FRAMESIZE]], [[ | + | [[$SWSTACK]] , [[$HWSTACK]] , [[$FRAMESIZE]], [[Memory Usage|Memory usage]] |
<span style="font-family: Arial;"> </span> | <span style="font-family: Arial;"> </span> | ||
Line 87: | Line 87: | ||
{{Languages}} | {{Languages}} | ||
− | [[Category: | + | [[Category:BASCOM Language Reference]] |
Latest revision as of 23:18, 6 February 2013
Contents |
Action
Instruct the compiler to use the specified register file instead of the selected dat file.
Syntax
$REGFILE = "name"
Remarks
Name |
The name of the register file. The register files are stored in the BASCOM-AVR application directory and they all have the DAT extension.
The register file holds information about the chip such as the internal registers and interrupt addresses. The register file info is derived from atmel definition files. |
The $REGFILE statement overrides the setting from the Options, Compiler, Chip menu.
The settings are stored in a <project>.CFG file.
The $REGFILE directive must be the first statement in your program. It may not be put into an included file since only the main source file is checked for the $REGFILE directive.
It is good practice to use the $REGFILE directive. It has the advantage that you can see at the source which chip it was written for. The $REGFILE directive is also needed when the PinOut viewer or the PDF viewer is used.
The register files contain the hardware register names from the micro. They also contain the bit names. These are constants that you may use in your program. But the names can not be used to dim a variable for example.
Example :
DIM PORTA As Byte
This will not work as PORTA is a register constant.
See also
$SWSTACK , $HWSTACK , $FRAMESIZE, Memory usage
ASM
NONE
Example
$REGFILE = "8515DEF.DAT"
Languages | English • Deutsch |
---|