8.1.14. (FIND)

section id="ff1802.paren-find-paren" xreflabel="(FIND)", xref.ff1802.paren-find-paren, link.ff1802.FIND

000424 018D 862846494E44A9           .DB H'86,"(FIND",H'A9 ; (FIND)
000425 0194 0163                     .DW DGT-8
000426 0196 0198             FIND:   .DW * + 2
000427 0198 29                       DEC R9
000428 0199 29                       DEC R9
000429 019A 49                       LDA R9
000430 019B B8                       PHI R8
000431 019C 49                       LDA R9
000432 019D A8                       PLO R8
000433 019E 49                       LDA R9
000434 019F B7                       PHI R7
000435 01A0 09                       LDN R9
000436 01A1 A7                       PLO R7
000437 01A2 29                       DEC R9
000438 01A3 29                       DEC R9
000439 01A4 E7               LOOP1:  SEX R7              ; SAVE LENGTH BYTE
000440 01A5 07                       LDN R7
000441 01A6 52                       STR R2
000442 01A7 48                       LDA R8              ; COMPARE LENGTH BYTES
000443 01A8 F3                       XOR
000444 01A9 FA3F                     ANI H'3F
000445 01AB 3AD3                     BNZ BADLEN
000446 01AD 17               NEXCHR: INC R7
000447 01AE 48                       LDA R8              ; COMPARE NEXT CHARACTER
000448 01AF F3                       XOR
000449 01B0 FE                       SHL
000450 01B1 3AD4                     BNZ BADCHR          ; NO MATCH ON 7 BITS
000451 01B3 7E                       SHLC
000452 01B4 32AD                     BZ NEXCHR           ; IF NOT LAST CHARACTER
000453 01B6 47               LOOP2:  LDA R7              ;   ELSE END OF STRING
000454 01B7 FA80                     ANI H'80
000455 01B9 32B6                     BZ LOOP2
000456 01BB E9                       SEX R9              ; END OF DICT NAME
000457 01BC 87                       GLO R7
000458 01BD FC04                     ADI H'04
000459 01BF 73                       STXD
000460 01C0 97                       GHI R7
000461 01C1 7C00                     ADCI H'00
000462 01C3 59                       STR R9              ; LEAVE PFA
000463 01C4 19                       INC R9
000464 01C5 19                       INC R9
000465 01C6 F800                     LDI H'00
000466 01C8 59                       STR R9
000467 01C9 19                       INC R9
000468 01CA 02                       LDN R2              ; GET LENGTH BYTE
000469 01CB 59                       STR R9
000470 01CC 19                       INC R9
000471 01CD F8FF                     LDI H'FF
000472 01CF 59                       STR R9
000473 01D0 19                       INC R9
000474 01D1 73                       STXD                ; AND TRUE FLAG
000475 01D2 DC                       SEP RC          ; next
000476 01D3 17               BADLEN: INC R7
000477 01D4 47               BADCHR: LDA R7
000478 01D5 FA80                     ANI H'80
000479 01D7 32D4                     BZ BADCHR
000480 01D9 07                       LDN R7
000481 01DA 3AE7                     BNZ BOK
000482 01DC 17                       INC R7
000483 01DD 07                       LDN R7
000484 01DE 27                       DEC R7
000485 01DF 3AE7                     BNZ BOK
000486 01E1 F800                     LDI H'00            ; LINK=0 RETURN FALSE
000487 01E3 59                       STR R9
000488 01E4 29                       DEC R9
000489 01E5 59                       STR R9
000490 01E6 DC                       SEP RC          ; next
000491 01E7 47               BOK:    LDA R7
000492 01E8 52                       STR R2
000493 01E9 07                       LDN R7
000494 01EA A7                       PLO R7
000495 01EB 02                       LDN R2
000496 01EC B7                       PHI R7
000497 01ED 09                       LDN R9
000498 01EE A8                       PLO R8
000499 01EF 29                       DEC R9
000500 01F0 49                       LDA R9
000501 01F1 B8                       PHI R8
000502 01F2 30A4                     BR LOOP1