bm_free
From ArchaicPixels: HuC and PCEAS Documentation
original documentation
bm_free(); [ 1.5+ ]
Return the number of free bytes available for user data. The amount
required for the data header and the necessary 2-byte termination are
alreadt deducted from this amount. The value returned is the number
of bytes free for user data.
bm_free
Prototypes:
bm_free();
Returns:
Amount of free RAM in backup RAM
Description:
This function returns the number of free bytes available for user data. The amount required for the data header and the necessary 2-byte termination are already deducted from this amount. The value returned is the number of bytes free for user data.
Complete Example:
#include "huc.h"
main()
{
if(!bm_check()) /* check to see if BRAM is available on this system */
{
put_string("BACKUP RAM NOT AVAILABLE.", 0, 0); /* give an error message */
} else {
put_number(bm_free(), 4, 0, 0); /* output the amount of free backup RAM */
}
}
