|
|
@@ -5,12 +5,12 @@ PC ORG @ 4 + ! ( find ) |
|
|
|
BC PUSHqq, |
|
|
|
HL PUSHqq, |
|
|
|
( First, figure out string len ) |
|
|
|
BC 0 LDddnn, |
|
|
|
A XORr, |
|
|
|
CPIR, |
|
|
|
( C has our length, negative, -1 ) |
|
|
|
A C LDrr, |
|
|
|
NEG, |
|
|
|
A DECr, |
|
|
|
HL DECss, A (HL) LDrr, A ORr, |
|
|
|
( special case. zero len? we never find anything. ) |
|
|
|
IFNZ, ( fail-B296 ) ( cont. ) |
|
|
|
IFNZ, ( fail-B296 ) |
|
|
|
( Let's do something weird: We'll hold HL by the *tail*. |
|
|
|
Because of our dict structure and because we know our |
|
|
|
lengths, it's easier to compare starting from the end. ) |
|
|
|
C A LDrr, B 0 LDrn, ( C holds our length ) |
|
|
|
BC ADDHLss, HL INCss, ( HL points to after-last-char ) |
|
|
|
( cont . ) |