Prev: 8E29 Up: Map Next: 8E6C
8E42: Subroutine
Used by the routines at transition and draw_mugshots.
sub_8e42 8E42 LD HL,$0000 Address of current message thing (frame delay, flags, attrs, bufaddr, attraddr, string)
8E45 LD B,$00 B = 0 -- self modified by (8E58 increments it), (8E8D resets it to 1)
sub_8e47_loop 8E47 DJNZ sub_8e42_1 sub_8e42_1
8E49 LD A,$14 A = 20 -- self modified by 8E4C, 8E51, (8E84 resets it perhaps)
8E4B DEC A A--
8E4C LD ($8E4A),A Self modify 8E49
8E4F RET NZ Return if non-zero
8E50 LD A,(HL) A = *HL
8E51 LD ($8E4A),A Self modify 8E49
8E54 LD A,($8E46) Increment operand of 8E45, affects TIME UP state if disabled
8E57 INC A
8E58 LD ($8E46),A
8E5B INC B B++
sub_8e42_1 8E5C INC HL HL++
8E5D LD A,(HL) A = *HL
8E5E AND A test flags
8E5F JR Z,sub_8e42_0 jump if zero
8E61 CALL print_message Call print_message
8E64 JR sub_8e47_loop Loop?
sub_8e42_0 8E66 DEC HL transition_control = HL[-1]
8E67 LD A,(HL)
8E68 LD ($A231),A
8E6B RET Return
Prev: 8E29 Up: Map Next: 8E6C