Prev: 0354 Up: Map Next: 0375
035E: Normalise Character
Used by the routines at ParseSpeechString and ParseAllophoneGroup.
Convert a character towards the dictionary alphabet, and set workspace bit 6 for intonation (uppercase vs lowercase).
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 dictionary alphabet. "A" and "a" both become 21.
0365 CP $61 Jump to NormaliseCharacter_Upper if this is not a lowercase letter.
0367 JR C,NormaliseCharacter_Upper
0369 SUB $40 Subtract 40 from a lowercase letter.
036B RES 6,(HL) Use low intonation and jump to NormaliseCharacter_Done.
036D JR NormaliseCharacter_Done
NormaliseCharacter_Upper 036F SUB $20 Subtract 20 from an uppercase letter.
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