length.xyw
length.xyw; Pushes the length of s
; s -> b
.label length
POPxw ; store start address
$00 POPx ; counter
.label length.loop
; if at end of string, go to end
LDBxw $00 EQU length.end JCNw
; otherwise increment address and counter
INCxw
INCx
length.loop JMPw
.label length.end
PSHx RTS