.title isascii Test for 7-bit Ascii character .ident /000001/ ; ;+ ; ; Index Test for 7-bit Ascii ; ; Usage ; ; isascii(c); ; int c; ; ; Description ; ; Return non-zero if c is a 7-bit Ascii character, ; 0 otherwise. ; ; Bugs ; ;- ; ; Edit history ; 000001 10-Mar-82 MM Use ctype ; ; The following definitions must match ctype.mac and ctype.h ; U = 0001 ; UPPER case alpha L = 0002 ; lower case alpha D = 0004 ; digit S = 0010 ; whitespace (tab, backspace, lf, etc) P = 0020 ; punctuation C = 0040 ; control X = 0100 ; hex alpha B = 0200 ; blank .psect c$code isascii:: clr r0 ; Assume the worst cmp 2(sp),#000177 ; is it better than the best bhi 10$ ; br if so inc r0 ; no, it's ascii 10$: rts pc ; and exit .end