Prev: 00852 Up: Map Next: 00885
00862: 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 00862 PUSH HL Stash HL on the stack.
00863 LD B,A Keep the character in B.
00864 XOR A Call ReadWorkspace for the flags byte.
00865 CALL ReadWorkspace
00868 LD A,B Restore the character.
Fold the letter into the dictionary alphabet. "A" and "a" both become 33.
00869 CP 97 Jump to NormaliseCharacter_Upper if this is not a lowercase letter.
00871 JR C,NormaliseCharacter_Upper
00873 SUB 64 Subtract 64 from a lowercase letter.
00875 RES 6,(HL) Use low intonation and jump to NormaliseCharacter_Done.
00877 JR NormaliseCharacter_Done
NormaliseCharacter_Upper 00879 SUB 32 Subtract 32 from an uppercase letter.
00881 SET 6,(HL) Use high intonation.
NormaliseCharacter_Done 00883 POP HL Restore HL from the stack.
00884 RET Return.
Prev: 00852 Up: Map Next: 00885