Prev: 11400 Up: Map Next: 11419
11405: 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 11405 CP "A" Test against 65, the code for 'A'.
11407 CCF Complement the carry flag.
11408 RET NC Return if not a valid character code.
11409 CP 91 Test against 91, 1 more than the code for 'Z'.
11411 RET C Return if an upper case letter.
11412 CP "a" Test against 97, the code for 'a'.
11414 CCF Complement the carry flag.
11415 RET NC Return if not a valid character code.
11416 CP 123 Test against 123, 1 more than the code for 'z'.
11418 RET Finished.
Prev: 11400 Up: Map Next: 11419