H | Character number (201-204, 206) |
26752 | CD5567 | CALL 26453 | Collect information about board | ||||||||||||
26755 | 04 | INC B | |||||||||||||
26756 | 48 | LD C,B | |||||||||||||
26757 | 067F | LD B,127 | Point BC at the second byte of the board's buffer | ||||||||||||
26759 | 0A | LD A,(BC) | |||||||||||||
26760 | A7 | AND A | Has the board been written on already? | ||||||||||||
26761 | C29063 | JP NZ,25488 | Don't bother trying to write on it if so | ||||||||||||
26764 | 7C | LD A,H | A=character's number | ||||||||||||
26765 | 02 | LD (BC),A | Signal: this character wrote on the board | ||||||||||||
26766 | 0D | DEC C | C=board identifier (84, 90, 96, 102, 108) | ||||||||||||
26767 | 3E01 | LD A,1 | Start writing at pixel column number 1 | ||||||||||||
26769 | 02 | LD (BC),A | |||||||||||||
26770 | 2E10 | LD L,16 | |||||||||||||
26772 | 3600 | LD (HL),0 | |||||||||||||
26774 | 2E0E | LD L,14 | |||||||||||||
26776 | 3600 | LD (HL),0 | |||||||||||||
26778 | 7C | LD A,H | A=character's number (201-204, 206) | ||||||||||||
26779 | FECE | CP 206 |
Set E as follows:
|
||||||||||||
26781 | CE3B | ADC A,59 | |||||||||||||
26783 | 5F | LD E,A | |||||||||||||
26784 | 8F | ADC A,A | |||||||||||||
26785 | 83 | ADD A,E | |||||||||||||
26786 | 87 | ADD A,A | |||||||||||||
26787 | 5F | LD E,A | |||||||||||||
26788 | CD9162 | CALL 25233 | A=random number | ||||||||||||
26791 | E607 | AND 7 | |||||||||||||
26793 | FE06 | CP 6 | |||||||||||||
26795 | 30F7 | JR NC,26788 | Jump back unless 0≤A≤5 | ||||||||||||
26797 | 83 | ADD A,E | |||||||||||||
26798 | 5F | LD E,A | Now E=blackboard message number | ||||||||||||
26799 | 16FE | LD D,254 | Pick up the address of the message and place it in bytes 11 and 12 of the character's buffer | ||||||||||||
26801 | 2E0B | LD L,11 | |||||||||||||
26803 | 1A | LD A,(DE) | |||||||||||||
26804 | 77 | LD (HL),A | |||||||||||||
26805 | 14 | INC D | |||||||||||||
26806 | 2C | INC L | |||||||||||||
26807 | 1A | LD A,(DE) | |||||||||||||
26808 | 77 | LD (HL),A | |||||||||||||
26809 | 2E09 | LD L,9 | Change the routine address in bytes 9 and 10 of the character's buffer to 26813 (below) | ||||||||||||
26811 | 36BD | LD (HL),189 | |||||||||||||
26813 | CD9167 | CALL 26513 | Write one letter on the board | ||||||||||||
26816 | 200B | JR NZ,26829 | Jump unless finished writing |
26818 | CDB461 | CALL 25012 | Update SRB for character's current animatory state and location |
26821 | E6F8 | AND 248 | A=animatory state of character with standing up normally |
26823 | CD3061 | CALL 24880 | Update SRB for character's new animatory state |
26826 | C39063 | JP 25488 | Finished |
26829 | CDB461 | CALL 25012 | Update SRB for character's current animatory state and location |
26832 | 0F | RRCA | |
26833 | 07 | RLCA | |
26834 | 3805 | JR C,26841 | Jump if the character's arm's up |
26836 | F607 | OR 7 | A=animatory state of character with arm up |
26838 | C33061 | JP 24880 | Update SRB for character's new animatory state and location |
26841 | E6F8 | AND 248 | A=animatory state of character with arm down |
26843 | 18F9 | JR 26838 |