Prev: 88A7 Up: Map Next: 88FD
88EC: Find an order for the current actor
Searches the eight 25-byte slots of the orders buffer (B628) for one addressed to the current actor (B5DB). Returns with Z set and HL pointing at the slot if one is found.
Output
F Z set if found
HL Order slot
88EC LD HL,$B628 HL = the start of the orders buffer
88EF LD DE,$0019 DE = 25, the size of one order slot
88F2 LD A,($B5DB) A = the current actor
88F5 LD B,$08 Eight slots to check
88F7 CP (HL) Is this slot addressed to the actor?
88F8 RET Z Yes: found it, with HL pointing at the slot
88F9 ADD HL,DE No: move on to the next slot
88FA DJNZ $88F7
88FC RET None found
Prev: 88A7 Up: Map Next: 88FD