mirror of
https://github.com/cc65/cc65.git
synced 2025-08-08 06:25:17 +00:00
Resolved conflict and removed adaptation for strpbrk for time being.
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
.constructor initiobuf
|
.constructor initiobuf
|
||||||
.export iobuf_alloc, iobuf_free
|
.export iobuf_alloc, iobuf_free
|
||||||
.import __STARTUP_RUN__
|
.import __MAIN_START__
|
||||||
.import incsp2, popptr1
|
.import incsp2, popptr1
|
||||||
|
|
||||||
.include "zeropage.inc"
|
.include "zeropage.inc"
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
initiobuf:
|
initiobuf:
|
||||||
; Convert end address highbyte to table index
|
; Convert end address highbyte to table index
|
||||||
lda #>__STARTUP_RUN__
|
lda #>__MAIN_START__
|
||||||
sec
|
sec
|
||||||
sbc #>$0800
|
sbc #>$0800
|
||||||
lsr
|
lsr
|
||||||
|
@@ -5,15 +5,17 @@
|
|||||||
;
|
;
|
||||||
|
|
||||||
.export _strpbrk
|
.export _strpbrk
|
||||||
.import popax, popptr1, return0
|
.import popax, return0
|
||||||
.importzp ptr1, ptr2, tmp1, tmp2, tmp3
|
.importzp ptr1, ptr2, tmp1, tmp2, tmp3
|
||||||
|
|
||||||
_strpbrk:
|
_strpbrk:
|
||||||
jsr popax ; get s2
|
jsr popax ; get s2
|
||||||
sta ptr2
|
sta ptr2
|
||||||
stx ptr2+1
|
stx ptr2+1
|
||||||
jsr popptr1 ; get s1
|
jsr popax ; get s1
|
||||||
; ldy #$00 Y=0 guaranteed by popptr1
|
sta ptr1
|
||||||
|
stx ptr1+1
|
||||||
|
ldy #$00
|
||||||
|
|
||||||
L1: lda (ptr1),y ; get next char from s1
|
L1: lda (ptr1),y ; get next char from s1
|
||||||
beq L9 ; jump if done
|
beq L9 ; jump if done
|
||||||
|
Reference in New Issue
Block a user