1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-23 19:29:37 +00:00
cc65/libsrc/cbm/cbm_save.c
mrintsch babcf84f17 Changed the parameters of cbm_load and cbm_save to a more "C-like" way.
The API should be stable now.


git-svn-id: svn://svn.cc65.org/cc65/trunk@1018 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-10-10 20:35:07 +00:00

23 lines
603 B
C

/*
* Marc 'BlackJack' Rintsch, 11.03.2001
*
* unsigned char cbm_save(const char* name,
* char device,
* unsigned char* data,
* unsigned int size);
*/
#include <cbm.h>
#include <errno.h>
/* saves a memory area from start to end-1 to a file.
*/
unsigned char cbm_save(const char* name, unsigned char device,
unsigned char* data, unsigned int size)
{
cbm_k_setlfs(0, device, 0);
cbm_k_setnam(name);
return _oserror =
cbm_k_save((unsigned int)data, ((unsigned int)data) + size);
}