

def test_example_4_2(self):
    example_4_2 = '\n        ; Example 4-2.  Deleting an entry from an unordered list\n        ;\n        ; Delete the contents of $2F from a list whose starting\n        ; address is in $30 and $31.  The first byte of the list\n        ; is its length.\n        ;\n\n        deluel: LDY #$00     ; fetch element count\n                LDA ($30),Y\n                TAX          ; transfer length to X\n                LDA $2F      ; item to delete\n        nextel: INY          ; index to next element\n                CMP ($30),Y  ; do entry and element match?\n                BEQ delete   ; yes. delete element\n                DEX          ; no. decrement element count\n                BNE nextel   ; any more elements to compare?\n                RTS          ; no. element not in list. done\n\n        ; delete an element by moving the ones below it up one location\n\n        delete: DEX          ; decrement element count\n                BEQ deccnt   ; end of list?\n                INY          ; no. move next element up\n                LDA ($30),Y\n                DEY\n                STA ($30),Y\n                INY\n                JMP delete\n        deccnt: LDA ($30,X)  ; update element count of list\n                SBC #$01\n                STA ($30,X)\n                RTS\n        '
    tokens = list(lexical(example_4_2))
    self.assertEquals(96, len(self))

dataset/ETHPy150Open gutomaia/pyNES/pynes/tests/guide_test.py GuideTest.test_example_4_2/VarMisuse@32/518 `tokens`->`self`