2018-07-27 17:38:47 +00:00
|
|
|
/* C02 Standard Definitions File *
|
|
|
|
* Contains common constants and *
|
|
|
|
* functions used in libraries. */
|
|
|
|
|
|
|
|
/* Constant Definitions */
|
2018-08-14 18:14:32 +00:00
|
|
|
#define TRUE $FF
|
|
|
|
#define FALSE $00
|
2018-07-27 17:38:47 +00:00
|
|
|
|
2019-05-27 21:12:10 +00:00
|
|
|
/* Add to Destination Pointer *
|
|
|
|
* Args: &n - amount to add */
|
|
|
|
void adddst();
|
|
|
|
|
|
|
|
/* Add to Source Pointer *
|
|
|
|
* Args: &n - amount to add */
|
|
|
|
void addsrc();
|
|
|
|
|
|
|
|
/* Add to Zero Page Word *
|
|
|
|
* Args: z - Zero page address *
|
|
|
|
* &n - amount to add */
|
|
|
|
void addzpw();
|
|
|
|
|
2018-07-27 17:38:47 +00:00
|
|
|
/* Get Destination Pointer *
|
|
|
|
* Returns: Y,X=Destination address */
|
2019-03-24 20:29:19 +00:00
|
|
|
int getdst();
|
2018-07-27 17:38:47 +00:00
|
|
|
|
|
|
|
/* Get Source Pointer *
|
|
|
|
* Returns: Y,X=Source address */
|
2019-03-24 20:29:19 +00:00
|
|
|
int getsrc();
|
2018-07-27 17:38:47 +00:00
|
|
|
|
2019-03-24 20:29:19 +00:00
|
|
|
/* Restore Destination Pointer *
|
|
|
|
* Returns: Y,X=Destination address */
|
|
|
|
int resdst();
|
2018-07-27 17:38:47 +00:00
|
|
|
|
2019-03-24 20:29:19 +00:00
|
|
|
/* Restore A, X, and Y Registers *
|
|
|
|
* Returns: A,Y,X=Saved Values */
|
|
|
|
char resreg();
|
2018-07-27 17:38:47 +00:00
|
|
|
|
2019-03-24 20:29:19 +00:00
|
|
|
/* Restore X, and Y Registers *
|
|
|
|
* Returns: Y,X=Saved Values */
|
|
|
|
int resrxy();
|
2018-07-27 17:38:47 +00:00
|
|
|
|
2019-03-24 20:29:19 +00:00
|
|
|
/* Restore Source Pointer *
|
|
|
|
* Returns: Y,X=Source address */
|
|
|
|
int ressrc();
|
2018-07-27 17:38:47 +00:00
|
|
|
|
2019-03-24 20:29:19 +00:00
|
|
|
/* Save Destination Pointer *
|
|
|
|
* Returns: Y,X=Destination address */
|
|
|
|
int savdst();
|
2018-07-27 17:38:47 +00:00
|
|
|
|
|
|
|
/* Save A, X, and Y Registers */
|
|
|
|
void savreg();
|
|
|
|
|
|
|
|
/* Save X, and Y Registers */
|
|
|
|
void savrxy();
|
|
|
|
|
2019-03-24 20:29:19 +00:00
|
|
|
/* Save Source Pointer *
|
|
|
|
* Returns: Y,X=Source address */
|
|
|
|
int savsrc();
|
2018-07-27 17:38:47 +00:00
|
|
|
|
2019-03-23 00:30:49 +00:00
|
|
|
/* Set Buffer Pointer *
|
|
|
|
* Args: &d - Buffer address */
|
|
|
|
void setbfr();
|
|
|
|
|
2018-07-30 22:35:35 +00:00
|
|
|
/* Set Destination Pointer to Source Pointer */
|
2019-03-24 20:29:19 +00:00
|
|
|
int setdss();
|
2018-07-30 22:35:35 +00:00
|
|
|
|
2018-07-27 17:38:47 +00:00
|
|
|
/* Set Destination Pointer *
|
|
|
|
* Args: &d - Destination address */
|
|
|
|
void setdst();
|
|
|
|
|
|
|
|
/* Set Source Pointer *
|
|
|
|
* Args: &d - Source address */
|
|
|
|
void setsrc();
|
|
|
|
|
|
|
|
/* Set Source Pointer to Destination Pointer */
|
|
|
|
void setsrd();
|
2019-05-27 21:12:10 +00:00
|
|
|
|