Skip to content

Array wrongly identified as dictionary entry

The Job:

Routine 25d4, 4 locals

 25d5:  36 04 1e 00             MUL             #04,G0e -> -(SP)
 25d9:  d4 2f 10 66 00 00       ADD             #1066,(SP)+ -> -(SP)
 25df:  55 00 02 01             SUB             (SP)+,#02 -> L00
 25e3:  4f 01 00 03             LOADW           L00,#00 -> L02
 25e7:  cd 4f 04 25 84          STORE           L03,"c lcjibcfdbfd forb
c   cs
coddnd?bapbpvc2  j LKn ?8ye y"
 25ec:  a0 56 d7                JZ              G46 [TRUE] 2604
 25ef:  f7 a7 03 04 10 02 d1    SCAN_TABLE      L02,L03,#10 -> L01 [TRUE] 2605
 25f6:  c1 83 03 1d bf 1e 34 48 JE              L02,"floor","ground" [FALSE]
2604
 25fe:  0d 31 06                STORE           G21,#06
 2601:  8c 00 16                JUMP            2618
 2604:  b1                      RFALSE
 2605:  75 02 04 02             SUB             L01,L03 -> L01
 2609:  be 02 8f 02 ff ff 02    LOG_SHIFT       L01,#ffff -> L01
 2610:  58 02 08 00             MOD             L01,#08 -> -(SP)
 2614:  54 00 01 31             ADD             (SP)+,#01 -> G21
 2618:  d0 2f 25 a4 31 30       LOADB           #25a4,G21 -> G20
 261e:  b0                      RTRUE

dict_end is actually the first byte after the end of the dictionary (code_base). If there's an array starting at dict_end this could wrongly be identified as a dictionary entry. Changed '>' to '>=' in the function in_dictionary (txd.c).

if (word_address < dict_start || word_address >= dict_end)