mirror of
https://github.com/RevCurtisP/C02.git
synced 2024-11-22 16:34:15 +00:00
Added functions to stddef module
This commit is contained in:
parent
8aa2c972a7
commit
5289bb8717
@ -28,7 +28,7 @@ RESRXY: LDX TEMP1 ;Load X Index
|
||||
LDY TEMP2 ;Load Y Index
|
||||
RTS
|
||||
|
||||
;Set Destinatioon Pointer to Source Pointer
|
||||
;Set Destination Pointer to Source Pointer
|
||||
SETDSS: JSR GETSRC ;Get Destination Pointer
|
||||
JMP SETDST ;Store in Source Pointer
|
||||
|
||||
@ -62,3 +62,18 @@ GETDST: LDX DSTLO
|
||||
GETSRC: LDX SRCLO
|
||||
LDY SRCHI
|
||||
RTS
|
||||
|
||||
;Add to Destination Address
|
||||
ADDDST: LDX #DSTLO ;Set Index
|
||||
BNE ADDZPW ;and Execute ADDZPW
|
||||
|
||||
;Add to Source Address
|
||||
ADDSRC: LDX #SRCLO ;Set Index and Drop into ADDZPW
|
||||
|
||||
;Add to Zero Page Word
|
||||
ADDZPW: CLC ;Clear Carry
|
||||
ADC 0,X ;Add Argument to LSB
|
||||
STA 0,X ;and Save Result
|
||||
BCC ADDZPX ;If Carry
|
||||
INC 1,X ; Increment MSB
|
||||
ADDZPX: RTS
|
||||
|
@ -6,13 +6,17 @@
|
||||
#define TRUE $FF
|
||||
#define FALSE $00
|
||||
|
||||
/* Get Buffer Pointer *
|
||||
* Returns: Y,X=Buffer address */
|
||||
char getdst();
|
||||
|
||||
/* Get Destination Pointer *
|
||||
* Returns: Y,X=Destination address */
|
||||
void getdst();
|
||||
char getdst();
|
||||
|
||||
/* Get Source Pointer *
|
||||
* Returns: Y,X=Source address */
|
||||
void getsrc();
|
||||
char getsrc();
|
||||
|
||||
/* Retore Destination Pointer */
|
||||
void resdst();
|
||||
@ -38,6 +42,10 @@ void savrxy();
|
||||
/* Save Source Pointer */
|
||||
void savsrc();
|
||||
|
||||
/* Set Buffer Pointer *
|
||||
* Args: &d - Buffer address */
|
||||
void setbfr();
|
||||
|
||||
/* Set Destination Pointer to Source Pointer */
|
||||
void setdss();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user