Prev: 2C88 Up: Map Next: 2C9B
2C8D: THE 'ALPHA' SUBROUTINE
Used by the routines at DEF_FN, INPUT, S_FN_SBRN, LOOK_VARS and usr.
The routine at ALPHANUM continues here.
This subroutine returns with the carry flag set if the present value of the A register denotes a valid letter of the alphabet.
Input
A Character code
Output
F Carry flag set if the character is a letter (A-Z, a-z)
ALPHA 2C8D CP "A" Test against +41, the code for 'A'.
2C8F CCF Complement the carry flag.
2C90 RET NC Return if not a valid character code.
2C91 CP $5B Test against +5B, 1 more than the code for 'Z'.
2C93 RET C Return if an upper case letter.
2C94 CP "a" Test against +61, the code for 'a'.
2C96 CCF Complement the carry flag.
2C97 RET NC Return if not a valid character code.
2C98 CP $7B Test against +7B, 1 more than the code for 'z'.
2C9A RET Finished.
Prev: 2C88 Up: Map Next: 2C9B