User`s manual

Dynamic C Users Manual digi.com 195
asm
Use in Dynamic C code to insert one assembly language instruction. If more than one assembly instruction
is desired use the compiler directive #asm instead.
int func() {
int x,y,z;
asm ld hl,0x3333
...
}
auto
A functions’s local variable is located on the system stack and exists as long as the function call does.
int func(){
auto float x;
...
}
bbram
IMPORTANT: bbram does not provide data integrity; instead, use the keyword protected to ensure integ-
rity of data across power failures.
Identifies a variable to be placed into a second root data area with global extent/scope reserved for battery-
backed RAM on boards with more than one RAM device. Generally, the battery-backed RAM is attached
to CS1 due to the low-power requirements. Other than its assigned root data location, a bbram variable is
identical to a normal root variable. In the case of a reset or power failure, the value of a bbram variable is
preserved, but not atomically like with protected variables. No software check is possible to ensure that the
RAM is battery-backed. This requirement must be enforced by the user. Note that bbram variables must
have either static or global storage.
For boards that utilize fast SRAM in addition to a battery-backed SRAM, like the RCM3200, the size of
the battery-backed root data space is specified by a BIOS macro called BBROOTDATASIZE. In version
Dynamic C 9.50 and earlier, the default value for this is 4K. Note that this macro is defined to zero for
boards with only a single SRAM.
See the Rabbit 2000 Microprocessor Designers Handbook or the Rabbit 3000 Microprocessor Designer’s
Handbook for information on how the second data area is reserved.
On boards with a single RAM, bbram variables will be treated the same as normal root variables. No warn-
ing will be given; the bbram keyword is simply ignored when compiling to boards with a single RAM with
the assumption that the RAM is battery-backed. Please refer to _xalloc for information on how to access
battery-backed data in xmem.