2001-03-13 22:48:19 +00:00
|
|
|
/*
|
|
|
|
* Marc 'BlackJack' Rintsch, 11.03.2001
|
|
|
|
*
|
2001-03-20 21:06:04 +00:00
|
|
|
* unsigned char cbm_save(const char* name,
|
|
|
|
* char device,
|
2001-10-10 20:35:07 +00:00
|
|
|
* unsigned char* data,
|
|
|
|
* unsigned int size);
|
2001-03-13 22:48:19 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <cbm.h>
|
2001-09-15 23:39:47 +00:00
|
|
|
#include <errno.h>
|
2001-03-30 18:18:40 +00:00
|
|
|
|
2001-03-20 21:06:04 +00:00
|
|
|
/* saves a memory area from start to end-1 to a file.
|
|
|
|
*/
|
|
|
|
unsigned char cbm_save(const char* name, unsigned char device,
|
2002-12-13 00:30:40 +00:00
|
|
|
const void* data, unsigned int size)
|
2001-03-13 22:48:19 +00:00
|
|
|
{
|
2001-03-20 21:06:04 +00:00
|
|
|
cbm_k_setlfs(0, device, 0);
|
|
|
|
cbm_k_setnam(name);
|
2001-10-10 20:35:07 +00:00
|
|
|
return _oserror =
|
|
|
|
cbm_k_save((unsigned int)data, ((unsigned int)data) + size);
|
2001-03-13 22:48:19 +00:00
|
|
|
}
|