Merge branch 'cc65:master' into master
This commit is contained in:
@@ -32,10 +32,8 @@ Y2K3 STA $0732,X
|
|||||||
LDA #$60 ; Store RTS opcode @ end
|
LDA #$60 ; Store RTS opcode @ end
|
||||||
STA $0750
|
STA $0750
|
||||||
JSR $0600 ; Show title screen
|
JSR $0600 ; Show title screen
|
||||||
LDY #$00 ; Clear RAM from $0600-$3FFF
|
LDY #<$0600 ; Clear RAM from $0600-$3FFF
|
||||||
STY $80
|
STY $80
|
||||||
LDA #$06
|
LDA #>$0600
|
||||||
STA $81
|
STA $81
|
||||||
JSR CLRRAM
|
JMP CLRRAM
|
||||||
RTS
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,17 +5,27 @@
|
|||||||
; the usage of only ptr2 here! Keep in mind when appling changes
|
; the usage of only ptr2 here! Keep in mind when appling changes
|
||||||
; and check the other implementations too!
|
; and check the other implementations too!
|
||||||
;
|
;
|
||||||
; int strlen (const char* s);
|
; size_t __fastcall__ strlen (const char* s);
|
||||||
;
|
;
|
||||||
|
|
||||||
.export _strlen
|
.export _strlen
|
||||||
.importzp ptr2
|
.importzp ptr2
|
||||||
|
.macpack cpu
|
||||||
|
|
||||||
_strlen:
|
_strlen:
|
||||||
sta ptr2 ; Save s
|
sta ptr2 ; Save s
|
||||||
stx ptr2+1
|
stx ptr2+1
|
||||||
|
.if (.cpu .bitand ::CPU_ISET_HUC6280)
|
||||||
|
clx
|
||||||
|
cly
|
||||||
|
.else
|
||||||
ldx #0 ; YX used as counter
|
ldx #0 ; YX used as counter
|
||||||
|
.if (.cpu .bitand ::CPU_ISET_65816)
|
||||||
|
txy
|
||||||
|
.else
|
||||||
ldy #0
|
ldy #0
|
||||||
|
.endif
|
||||||
|
.endif
|
||||||
|
|
||||||
L1: lda (ptr2),y
|
L1: lda (ptr2),y
|
||||||
beq L9
|
beq L9
|
||||||
|
|||||||
Reference in New Issue
Block a user