Prev: F15F Up: Map Next: F17F
F171: Copy two bytes from a command list into a character's buffer
Used by the routines at 7A6A, 7CC8, F1FC and F748. Copies two bytes from a character's current command list into his buffer. Returns with HL pointing at the second byte of the pair in the character's buffer.
Input
H Character number (0xD7-0xE5)
L Destination for the copied bytes
F171 LD A,$02 Two bytes will be copied
F173 PUSH AF Save the byte counter
F174 CALL $F15F Collect one byte from the character's command list
F177 LD (HL),A Copy it to the character's buffer
F178 POP AF Restore the byte counter to A
F179 INC L Point HL at the destination for the second byte
F17A DEC A Have we copied both bytes yet?
F17B JR NZ,$F173 Jump back to copy the second one if not
F17D DEC L Point HL at the second byte that was copied
F17E RET
Prev: F15F Up: Map Next: F17F