diff --git a/libsrc/geos/common/memset.s b/libsrc/geos/common/memset.s index 74005b0e9..1a98c1c34 100644 --- a/libsrc/geos/common/memset.s +++ b/libsrc/geos/common/memset.s @@ -34,8 +34,12 @@ _memset: sta r2L common: jsr popax sta r1L + pha stx r1H + txa + pha jsr FillRam - lda r1L ; restore ptr and pass as result - ldx r1H + pla ; restore ptr and return it + tax + pla rts diff --git a/libsrc/geos/memory/movedata.s b/libsrc/geos/memory/movedata.s index b16ef2392..5391e95c5 100644 --- a/libsrc/geos/memory/movedata.s +++ b/libsrc/geos/memory/movedata.s @@ -4,7 +4,7 @@ ; ; 30.10.99, 15.07.2001 -; void MoveData (char* dest, char *source, int length); +; void* MoveData (char* dest, char *source, int length); .import popax .export _MoveData @@ -21,4 +21,7 @@ _MoveData: jsr popax sta r1L stx r1H - jmp MoveData + jsr MoveData + lda r1L ; return dest ptr to be compatible with memmove and memcpy + ldx r1H + rts