Copyright (c) Hyperion Entertainment and contributors.

BattMem Resource

From AmigaOS Documentation Wiki
Revision as of 22:52, 12 July 2012 by Alexandre Balaban (talk | contribs) (Changed layout for Resource Information source)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
WIP.png This page is currently being updated to AmigaOS 4.x. Some of the information contained here may not yet be applicable in part or totally.

The battery-backed memory (BattMem) preserves a small portion of Amiga memory while the system is powered off. Some of the information stored in this memory is used during the system boot sequence.

The battmem resource provides access to the BattMem. Four functions allow you to use the BattMem.

BattMem Resource Functions

ObtainBattSemaphore Obtain exclusive access to the BattMem.
ReadBattMem() Read a bitstring from the BattMem. You specify the bit position and the number of bits you wish to read.
ReleaseBattSemaphore() Relinquish exclusive access to the BattMem.
WriteBattMem() Write a bitstring to the BattMem. You specify the bit position and the number of bits you wish to write.

The system considers BattMem to be a set of bits rather than bytes. This is done to conserve the limited space available. All bits are reserved, and applications should not read, or write undefined bits. Writing bits should be done with extreme caution since the settings will survive power-down/power-up. You can find the bit definitions in the BattMem include files resources/battmembitsamiga.h, resources/battmembitsamix.h and resources/battmembitsshared.h. They should be consulted before you do anything with the resource.

You Don’t Need This Resource.
The BattMem resource is basically for system use only. There is generally no reason for applications to use it. It is documented here simply for completeness.

Additional information on the battmem resource can be found in the include files and the Autodocs for the battmem resource.

BattMem Resource Information
Includes resources/battmem.i
resources/battmembitsamiga.h
resources/battmembitsamix.h
resources/battmembitsshared.h
AutoDocs battmem.doc