From cca4e7aea1f9ec54284bca0ad7b7138c31a64d9d Mon Sep 17 00:00:00 2001 From: Curtis F Kaylor Date: Mon, 30 Jul 2018 18:35:35 -0400 Subject: [PATCH] Added function setdss to library 'stddef' --- doc/stddef.txt | 7 +++++++ include/stddef.a02 | 4 ++++ include/stddef.h02 | 3 +++ 3 files changed, 14 insertions(+) diff --git a/doc/stddef.txt b/doc/stddef.txt index 6c9080b..5e699d9 100644 --- a/doc/stddef.txt +++ b/doc/stddef.txt @@ -53,6 +53,13 @@ The following functions are defined: most significant byte, passed in the Y register, to desthi. + setdss(); Sets the destination pointer to the source + pointer. + + Note: Calls the getsrc function, followed by + the setdst function, copying srclo and srchi + to dstlo and dsthi, respectively. + setsrd(); Sets the source pointer to the destination pointer. diff --git a/include/stddef.a02 b/include/stddef.a02 index b8a01ee..4b7982c 100644 --- a/include/stddef.a02 +++ b/include/stddef.a02 @@ -28,6 +28,10 @@ RESRXY: LDX TEMP1 ;Load X Index LDY TEMP2 ;Load Y Index RTS +;Set Destinatioon Pointer to Source Pointer +SETDSS: JSR GETSRC ;Get Destination Pointer + JMP SETDST ;Store in Source Pointer + ;Restore Destination Pointer RESDST: JSR RESRXY ;Load Address and Drop into SETDST diff --git a/include/stddef.h02 b/include/stddef.h02 index 9495f8e..3ee9c4f 100644 --- a/include/stddef.h02 +++ b/include/stddef.h02 @@ -37,6 +37,9 @@ void savrxy(); /* Save Source Pointer */ void savsrc(); +/* Set Destination Pointer to Source Pointer */ +void setdss(); + /* Set Destination Pointer * * Args: &d - Destination address */ void setdst();