![]() |
Routines |
| Prev: 43921 | Up: Map | Next: 44068 |
|
Used by the routines at CopyDisplayIfNeeded and CheckDisplayMode.
Scans the character-id pairs at 39245 for the two characters being compared, and stops at the zero word that ends the table.
|
||||
| MatchCharacterPair | 44019 | CALL SaveTextPointer | Call SaveTextPointer, and call it again if it returns 128. | |
| 44022 | CP 128 | |||
| 44024 | CALL Z,SaveTextPointer | |||
| 44027 | LD A,B | Use the character pairs (39245). | ||
| 44028 | AND 15 | |||
| 44030 | LD B,A | |||
| 44031 | LD HL,39245 | |||
| MatchCharacterPair_Loop | 44034 | LD A,(HL) | Go to MatchCharacterPair_Next if this word is zero. | |
| 44035 | INC HL | |||
| 44036 | OR (HL) | |||
| 44037 | JR Z,MatchCharacterPair_Next | |||
| 44039 | LD A,B | Jump ahead to MatchCharacterPair_0 if this pair's first id differs. | ||
| 44040 | CP (HL) | |||
| 44041 | JR NZ,MatchCharacterPair_0 | |||
| 44043 | DEC HL | Jump ahead to MatchCharacterPair_CharacterScriptPosition if this pair's second id matches. | ||
| 44044 | LD A,C | |||
| 44045 | CP (HL) | |||
| 44046 | JR Z,MatchCharacterPair_CharacterScriptPosition | |||
| 44048 | INC HL | Step to the next character. | ||
| MatchCharacterPair_0 | 44049 | INC HL | Step to the next character pair and go back to MatchCharacterPair_Loop. | |
| 44050 | JR MatchCharacterPair_Loop | |||
| MatchCharacterPair_Next | 44052 | OR %00000001 | Reset the zero flag. | |
| 44054 | RET | Return. | ||
|
Store this character's id and script position, then clear the link bit.
|
||||
| MatchCharacterPair_CharacterScriptPosition | 44055 | LD (IY+0),C | Store BC at IY+0-1 and clear bit 1 of E. | |
| 44058 | LD (IY+1),B | |||
| 44061 | RES 1,E | |||
| 44063 | CALL SaveTextPointer | Call SaveTextPointer to save the text pointer. | ||
| 44066 | XOR A | Clear A. | ||
| 44067 | RET | Return. | ||
| Prev: 43921 | Up: Map | Next: 44068 |