![]() |
Routines |
H | Character number of little boy (153-162) |
L | 122 |
27266 | 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 122 of the boy's buffer |
27267 | AND 31 | |
27269 | ADD A,32 | |
27271 | LD (HL),A | |
27272 | LD DE,39037 | A=byte 125 of little boy no. 1's buffer, which holds the MSB of the controlling routine address |
27275 | LD A,(DE) | |
27276 | CP 105 | Return unless little boy no. 1 is under the control of the routine at 27126, i.e. he's stampeding |
27278 | RET NZ | |
27279 | LD L,E | Place the address of the routine at 27126 in bytes 124 and 125 of the character's buffer |
27280 | LD (HL),A | |
27281 | DEC L | |
27282 | LD (HL),246 | |
27284 | LD E,99 | Copy bytes 99-102 of little boy no. 1's character buffer into bytes 99-102 of this little boy's character buffer; bytes 99 and 100 will then contain the address of the routine at 27246, and bytes 101 and 102 will contain little boy no. 1's destination |
27286 | LD L,E | |
27287 | LD BC,4 | |
27290 | EX DE,HL | |
27291 | LDIR | |
27293 | EX DE,HL | |
27294 | JP 25549 | Make this little boy follow little boy no. 1 |