Routines |
Prev: 57232 | Up: Map | Next: 57625 |
|
||||
57517 | LD HL,53837 | HL=Active_MonsterXPosition. | ||
57520 | LD A,C | A=C. | ||
57521 | AND A | Jump to 57537 if the sign flag set. | ||
57522 | JP M,57537 | |||
57525 | ADD A,(HL) | A+=*HL. | ||
57526 | LD C,A | C=A. | ||
57527 | INC HL | Increment HL by one. | ||
57528 | LD A,B | A=B. | ||
57529 | AND A | Jump to 57545 if the sign flag set. | ||
57530 | JP M,57545 | |||
57533 | ADD A,(HL) | A+=*HL. | ||
57534 | LD B,A | B=A. | ||
57535 | JR 57551 | Jump to 57551. | ||
57537 | XOR %10000000 | Flip bit 7. | ||
57539 | SUB (HL) | A-=*HL. | ||
57540 | CPL | Invert the bits in A. | ||
57541 | INC A | Increment A by one. | ||
57542 | LD C,A | C=A. | ||
57543 | JR 57527 | Jump to 57527. | ||
57545 | XOR %10000000 | Flip bit 7. | ||
57547 | SUB (HL) | A-=*HL. | ||
57548 | CPL | Invert the bits in A. | ||
57549 | INC A | Increment A by one. | ||
57550 | LD B,A | B=A. | ||
This entry point is used by the routines at Handler_Humans, 62544 and 62694.
|
||||
57551 | LD A,C | A=C. | ||
57552 | CP 32 | Jump to 57610 if A is higher than 32. | ||
57554 | JR NC,57610 | |||
57556 | LD A,B | A=B. | ||
57557 | CP 24 | Jump to 57610 if A is higher than 24. | ||
57559 | JR NC,57610 | |||
57561 | RRCA | RRCA. | ||
57562 | RRCA | |||
57563 | RRCA | |||
57564 | LD L,A | L=A. | ||
57565 | AND %00000011 | Keep only bits 0-1. | ||
57567 | ADD A,101 | A+=101. | ||
57569 | LD H,A | H=A. | ||
57570 | LD A,L | A=L. | ||
57571 | AND %11100000 | Keep only bits 5-7. | ||
57573 | ADD A,C | A+=C. | ||
57574 | LD L,A | L=A. | ||
57575 | LD A,(HL) | Jump to 57598 if *HL is not zero. | ||
57576 | AND A | |||
57577 | JR NZ,57598 | |||
57579 | DEC H | Decrease H by three. | ||
57580 | DEC H | |||
57581 | DEC H | |||
57582 | LD A,(HL) | Jump to 57598 if *HL is not zero. | ||
57583 | AND A | |||
57584 | JR NZ,57598 | |||
57586 | LD A,D | A=D. | ||
57587 | CP 61 | Jump to 57619 if A is not equal to 61. | ||
57589 | JR NZ,57619 | |||
57591 | DEC H | Decrease H by three. | ||
57592 | DEC H | |||
57593 | DEC H | |||
57594 | LD A,(HL) | Jump to 57620 if *HL is zero. | ||
57595 | AND A | |||
57596 | JR Z,57620 | |||
57598 | CP D | Jump to 57620 if A is lower than D. | ||
57599 | JR C,57620 | |||
57601 | INC E | Increment E by one. | ||
57602 | CP E | Jump to 57620 if A is higher than E. | ||
57603 | JR NC,57620 | |||
57605 | LD (53781),A | Write A to *53781. | ||
57608 | OR A | Set the bits from A. | ||
57609 | RET | Return. | ||
57610 | POP HL | Restore HL from the stack. | ||
57611 | LD A,(54267) | Jump to 61318 if *54267 is zero. | ||
57614 | AND A | |||
57615 | JP Z,61318 | |||
57618 | PUSH HL | Stash HL on the stack. | ||
57619 | XOR A | Write 0 to *53781. | ||
57620 | LD (53781),A | |||
57623 | XOR A | A=0. | ||
57624 | RET | Return. |
Prev: 57232 | Up: Map | Next: 57625 |