47
8.10 Find Next NEXT
Format:
NEXT
To find the next occurrence of a string of bytes previously specified with a FIND command. This
command actually searches only local memory, but this is unimportant as local memory will have been
updated by the FIND command. No commands other that FIND or NEXT can be interposed between
one use of FIND or NEXT and the NEXT command - for example, issuing the FIND command
followed by the L(List) command will generate an error if the NEXT command is then issued.
The address returned by this command is that of the start of the next occurrence of the string.
For example, suppose that memory contained the following bytes:
+0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F
8000 86 00 B7 10 08 86 38 B7 10 09 86 16 B7 10 28 B6 ......8.......(.
8010 10 28 8A 40 B7 10 28 44 45 46 44 45 46 44 45 46 .(.@..(DEFDEFDEF
8020 A7 00 08 5A 26 FA 86 00 C6 07 CE 80 60 BD 80 86 ...Z&.......'...
and that the command:
FIND 8000 802F 'DEF'
had found the first occurrence of the byte sequence $41, $42, $43 at $8017. Issuing the command
NEXT
would elicit the output:
String found at: $801A
and issuing NEXT again would produce:
String found at: $801D
Kommentare zu diesen Handbüchern