1
0
mirror of https://github.com/RevCurtisP/C02.git synced 2026-04-20 10:16:47 +00:00

Added library 'stack'

This commit is contained in:
Curtis F Kaylor
2018-07-25 19:00:46 -04:00
parent cc82237782
commit 3f03f71857
12 changed files with 442 additions and 130 deletions
+2 -1
View File
@@ -49,14 +49,15 @@ STRCLX: LDA #$FF ;Load -1 into Accumulater
;strlen(&s) - Return Length of String
;Args: X,Y - Pointer to string
;Sets: SRCLO,SRCHI = Pointer to source string
;Affects: N,Z
;Returns: A,Y = Length of string
; N,Z based on A
STRLEN: JSR SETSRC ;Initialize Source String
STRLEL: LDA (SRCLO),Y ;Get Next Character
BEQ STRLEX ;If <> NUL
INY ; Increment Index
BPL STRLEL ; and Loop if < 128
STRLEX: TYA ;Transfer Index to Accumulator
ORA #0 ;Set N and Z flags
RTS ;and Return
;strdst(&s) - Set Destination String