$DEFAULT
Aus MCS Wiki AVR
(Unterschied zwischen Versionen)
Admin (Diskussion | Beiträge) (Created page with "= <span class="f_Header">Action</span><br/> = Set the default for data types dimensioning to the specified type. <span style="font-family: 'Arial'; color: #000000"> </...") |
Admin (Diskussion | Beiträge) |
||
| Zeile 41: | Zeile 41: | ||
<span style="font-family: 'Arial'; color: #000000"> </span> | <span style="font-family: 'Arial'; color: #000000"> </span> | ||
| − | To switch back to the default behavior, use $END $DEFAULT | + | To switch back to the default behavior, use [[$END]] [[$DEFAULT]] |
<span style="font-family: 'Arial'; color: #000000"> </span> | <span style="font-family: 'Arial'; color: #000000"> </span> | ||
Aktuelle Version vom 31. Januar 2013, 20:29 Uhr
Inhaltsverzeichnis |
Action
Set the default for data types dimensioning to the specified type.
Syntax
$DEFAULT var
Remarks
|
Var |
SRAM, XRAM, ERAM |
Each variable that is dimensioned will be stored into SRAM, the internal memory of the chip. You can override it by specifying the data type.
Dim B As XRAM Byte , will store the data into external memory.
When you want all your variables to be stored in XRAM for example, you can use the statement : $DEFAULT XRAM
Each Dim statement will place the variable in XRAM in that case.
To switch back to the default behavior, use $END $DEFAULT
See also
NONE
ASM
NONE
Example
$regfile = "m48def.dat" $crystal = 4000000 $baud = 19200 Config Com1 = Dummy , Synchrone = 0 , Parity = None , Stopbits = 1 , Databits = 8 , Clockpol = 0 $default Xram Dim A As Byte , B As Byte , C As Byte 'a,b and c will be stored into XRAM $default Sram Dim D As Byte 'D will be stored in internal memory, SRAM
| Languages | English • Deutsch |
|---|