diff --git a/blk/291 b/blk/291 index f6b1bc1..5813ebb 100644 --- a/blk/291 +++ b/blk/291 @@ -7,6 +7,7 @@ CODE _find ( cur w -- a f ) A (HL) LDrr, A ORr, ( special case. zero len? we never find anything. ) IFZ, PUSH0, JPNEXT, THEN, + BC PUSH, ( --> lvl 2, protect ) ( 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. ) diff --git a/blk/292 b/blk/292 index 54e671c..7d5350a 100644 --- a/blk/292 +++ b/blk/292 @@ -1,7 +1,7 @@ BEGIN, ( loop ) ( DE is a wordref, first step, do our len correspond? ) - HL PUSH, ( --> lvl 2 ) - DE PUSH, ( --> lvl 3 ) + HL PUSH, ( --> lvl 3 ) + DE PUSH, ( --> lvl 4 ) DE DECd, LDA(DE), 0x7f ANDi, ( remove IMMEDIATE flag ) diff --git a/blk/294 b/blk/294 index 815ebc5..43f9880 100644 --- a/blk/294 +++ b/blk/294 @@ -1,13 +1,13 @@ ( At this point, Z is set if we have a match. In all cases, we want to pop HL and DE ) - DE POP, ( <-- lvl 3 ) + DE POP, ( <-- lvl 4 ) IFZ, ( match, we're done! ) - HL POP, HL POP, ( <-- lvl 1-2 ) DE PUSH, PUSH1, - JPNEXT, + HL POP, BC POP, HL POP, ( <-- lvl 1-3 ) DE PUSH, + PUSH1, JPNEXT, THEN, ( no match, go to prev and continue ) DE DECd, DE DECd, DE DECd, ( prev field ) - DE PUSH, ( --> lvl 3 ) + DE PUSH, ( --> lvl 4 ) EXDEHL, LDDE(HL), diff --git a/blk/295 b/blk/295 index 24acf7d..5bd0c8c 100644 --- a/blk/295 +++ b/blk/295 @@ -1,13 +1,14 @@ ( DE contains prev offset ) - HL POP, ( <-- lvl 3, prev field ) + HL POP, ( <-- lvl 4, prev field ) DEZ, IFNZ, ( offset not zero ) ( get absolute addr from offset ) ( carry cleared from "or e" ) DE SBCHLd, EXDEHL, ( result in DE ) THEN, - HL POP, ( <-- lvl 2 ) + HL POP, ( <-- lvl 3 ) JRNZ, AGAIN, ( loop-B292, try to match again ) + BC POP, ( <-- lvl 2 ) ( Z set? end of dict, not found. "w" already on PSP TOS ) PUSH0, ;CODE