4 * Ullrich von Bassewitz, 03.06.1998
15 int __fastcall__ isalnum (int c);
16 int __fastcall__ isalpha (int c);
17 int __fastcall__ iscntrl (int c);
18 int __fastcall__ isdigit (int c);
19 int __fastcall__ isgraph (int c);
20 int __fastcall__ islower (int c);
21 int __fastcall__ isprint (int c);
22 int __fastcall__ ispunct (int c);
23 int __fastcall__ isspace (int c);
24 int __fastcall__ isupper (int c);
25 int __fastcall__ isxdigit (int c);
26 #ifndef __STRICT_ANSI__
27 int __fastcall__ isblank (int c); /* cc65 (and GNU) extension */
30 int __fastcall__ toupper (int c); /* Always external */
31 int __fastcall__ tolower (int c); /* Always external */
35 /* When inlining of known function is enabled, overload most of the above
36 * functions by macros. The function prototypes are again available after
37 * #undef'ing the macros.
42 extern unsigned char _ctype[256];
44 #define isalnum(c) (__AX__ = (c), __asm__ ("\ttay\n\tlda\t__ctype,y\n\tand\t#$07"), __AX__)
45 #define isalpha(c) (__AX__ = (c), __asm__ ("\ttay\n\tlda\t__ctype,y\n\tand\t#$03"), __AX__)
46 #define iscntrl(c) (__AX__ = (c), __asm__ ("\ttay\n\tlda\t__ctype,y\n\tand\t#$10"), __AX__)
47 #define isdigit(c) (__AX__ = (c), __asm__ ("\ttay\n\tlda\t__ctype,y\n\tand\t#$04"), __AX__)
48 #define isgraph(c) (__AX__ = (c), __asm__ ("\ttay\n\tlda\t__ctype,y\n\teor\t#$30\n\tand\t#$30"), __AX__)
49 #define islower(c) (__AX__ = (c), __asm__ ("\ttay\n\tlda\t__ctype,y\n\tand\t#$01"), __AX__)
50 #define isprint(c) (__AX__ = (c), __asm__ ("\ttay\n\tlda\t__ctype,y\n\teor\t#$10\n\tand\t#$10"), __AX__)
51 #define ispunct(c) (__AX__ = (c), __asm__ ("\ttay\n\tlda\t__ctype,y\n\teor\t#$37\n\tand\t#$37"), __AX__)
52 #define isspace(c) (__AX__ = (c), __asm__ ("\ttay\n\tlda\t__ctype,y\n\tand\t#$60"), __AX__)
53 #define isupper(c) (__AX__ = (c), __asm__ ("\ttay\n\tlda\t__ctype,y\n\tand\t#$02"), __AX__)
54 #define isxdigit(c) (__AX__ = (c), __asm__ ("\ttay\n\tlda\t__ctype,y\n\tand\t#$08"), __AX__)
56 #ifndef __STRICT_ANSI__
57 /* cc65 and GNU extension */
58 #define isblank(c) (__AX__ = (c), __asm__ ("\ttay\n\tlda\t__ctype,y\n\tand\t#$80"), __AX__)