mirror of
https://github.com/RevCurtisP/C02.git
synced 2026-04-20 10:16:47 +00:00
Added function clrmem() to module 'memory'
This commit is contained in:
@@ -89,6 +89,11 @@ MEMCPL: LDA (SRCLO),Y ;Get Character from Source Array
|
||||
TYA ;Copy Index to Accumulater
|
||||
RTS ;Else Return
|
||||
|
||||
MEMCLR: JSR SETDST ;Set Destination Address
|
||||
TAY ;Transer Count to Y
|
||||
LDA #0 ;Set Fill Character to Null
|
||||
;and Fall into MEMSET
|
||||
|
||||
;memset(c, n) - Fill Destination Array
|
||||
;Args: A = Character to fill with
|
||||
; Y = Number of bytes to fill
|
||||
|
||||
+10
-5
@@ -14,6 +14,12 @@ void memdst();
|
||||
* $FF if not found */
|
||||
char memchr();
|
||||
|
||||
/* Clear Array (Fill with $00) *
|
||||
* Args: n - Number of bytes to fill *
|
||||
* &s - Array to fill *
|
||||
* Returns: Number of bytes filled */
|
||||
char memclr();
|
||||
|
||||
/* Compare Destination Array against Source Array *
|
||||
* Args: n - Number of bytes to compare *
|
||||
* &s - Source array *
|
||||
@@ -26,14 +32,13 @@ char memcmp();
|
||||
|
||||
/* Copy Source Array to Destination Array *
|
||||
* Args: n - Number of bytes to copy *
|
||||
* &s - Source array *
|
||||
* &s - Source array *
|
||||
* Sets: Destination string specified by memdst() */
|
||||
char memcpy();
|
||||
|
||||
/* Fill Destination Array with Character *
|
||||
* Args: c - Character to fill array with *
|
||||
/* Fill Destination Array with Byte *
|
||||
* Args: b - Character to fill array with *
|
||||
* n - Number of bytes to fill *
|
||||
* Uses: Destination array specified by memdst() *
|
||||
* Returns: Number of characters copied */
|
||||
* Returns: Number of bytes copied */
|
||||
char memset();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user