Sherlock: annotated disassembly

Routines

Prev: D2AD Up: Map Next: D2F2
D2ED: Total size (+2) of the things directly in thing A
D305 with B = 1: adds the size byte (+2) of every thing whose container (+1) is A; C = $FF if it goes over 127. The fit check at DEE4 compares this with the container's capacity ($DEF8).
Input
A the container
Output
A the total
D2ED PUSH BC Save BC on the stack
D2EE LD B,$01 Load B with $01
D2F0 JR $D2F5 Skip ahead to D2F5
Prev: D2AD Up: Map Next: D2F2