Prev: 0354 Up: Map Next: 0375
035E: Normalise Character
Used by the routines at ParseSpeechString and ParseAllophoneGroup.
Convert a character to the alphabet of CharacterKeys and SuffixKeys, and set workspace bit 6 for intonation (set for codes below "a").
Input
A Character
Output
A Normalised character
NormaliseCharacter 035E PUSH HL Stash HL on the stack.
035F LD B,A Keep the character in B.
0360 XOR A Call ReadWorkspace for the flags byte.
0361 CALL ReadWorkspace
0364 LD A,B Restore the character.
Fold the letter into the CharacterKeys alphabet. "A" and "a" both become 21.
0365 CP $61 Jump to NormaliseCharacter_BelowA if the character is below "a".
0367 JR C,NormaliseCharacter_BelowA
0369 SUB $40 Subtract 40 from a character at or above "a".
036B RES 6,(HL) Use low intonation and jump to NormaliseCharacter_Done.
036D JR NormaliseCharacter_Done
NormaliseCharacter_BelowA 036F SUB $20 Subtract 20 from a character below "a".
0371 SET 6,(HL) Use high intonation.
NormaliseCharacter_Done 0373 POP HL Restore HL from the stack.
0374 RET Return.
Prev: 0354 Up: Map Next: 0375