2001-03-13 22:48:19 +00:00
|
|
|
/*
|
2014-06-30 09:10:35 +00:00
|
|
|
** Marc 'BlackJack' Rintsch, 11.03.2001
|
|
|
|
**
|
|
|
|
** unsigned char cbm_save(const char* name,
|
|
|
|
** char device,
|
|
|
|
** 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.
|
2014-06-30 09:10:35 +00:00
|
|
|
*/
|
2010-06-04 10:25:53 +00:00
|
|
|
unsigned char __fastcall__ cbm_save (const char* name,
|
|
|
|
unsigned char device,
|
|
|
|
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
|
|
|
}
|