| Routines

6A82: Make a little boy find and follow little boy no. 1

Used by command list 0xCE (which is used by little boys 2-11).
Input
H | Little boy's character number (0x99-0xA2)
L | 0x7A
6A82 | LD A,(HL) | Reset bit 6 (do not walk slowly continuously) and bit 7 (walk fast) and set bit 5 (walk fast continuously) of byte 0x7A of the boy's buffer
6A83 | AND $1F
6A85 | ADD A,$20
6A87 | LD (HL),A
6A88 | LD DE,$987D | Collect byte 0x7D of little boy no. 1's buffer, which holds the MSB of a continual subcommand routine address
6A8B | LD A,(DE)
6A8C | CP $69 | Return unless little boy no. 1's continual subcommand is the routine at 69F6, i.e. he's tripping people up as he proceeds to his destination
6A8E | RET NZ
6A8F | LD L,E | Place the address of the continual subcommand routine at 69F6 into bytes 0x7C and 0x7D of this boy's character buffer (making him trip people up as he follows little boy no. 1)
6A90 | LD (HL),A
6A91 | DEC L
6A92 | LD (HL),$F6
6A94 | LD E,$63 | Copy bytes 0x63-0x66 of little boy no. 1's character buffer into bytes 0x63-0x66 of this little boy's character buffer; bytes 0x63 and 0x64 will then contain 63D1, and bytes 0x65 and 0x66 will contain little boy no. 1's destination
6A96 | LD L,E
6A97 | LD BC,$0004
6A9A | EX DE,HL
6A9B | LDIR
6A9D | EX DE,HL |
6A9E | JP $63CD | Make this little boy follow little boy no. 1