browser

oneof.xyw

oneof.xyw
calendarsave
; Checks if char in a is one of chars in s2
; a s2 -> f
.label oneof
  POPyw
  POPxw
  .label oneof.loop
    ; if at end of string, then no char is matching 
    LDByw $00 EQU oneof.fail JCNw
    ; if char matches, ok
    LDBxyw EQU oneof.ok JCNw
    INCyw oneof.loop JMPw
    .label oneof.fail
      $00 RTS
    .label oneof.ok
      $01 RTS