/* This C language subroutine returns non-zero if the input is a control character, zero otherwise. The Run Time Library for the C Language. Gordon A. Sterling (617) 461 - 3076 DSP Development Tools Engineering Updated on 5/94 by AS #include
int iscntrl(int c); */ #include "lib_glob.h" #include "cty_glob.h" .SEGMENT/CODE Code_Space_Name; .FILE RTL_FILENAME; .GLOBAL _iscntrl; _iscntrl: R4=PASS R4, R0=dm_1; /* Test for EOF, set ret*/ IF LT R0=R0-R0; /* If EOF return 0 */ R2=127; /* Test for del */ COMP(R4,R2), FETCH_RETURN /* If ch != del return 0*/ /* If ch == del, (from above) this test is not done */ R2=31; /* Upper bound on cntrl */ IF NE COMP(R4,R2); /* Is ch <= 31 */ IF GT R0=R0-R0; /* Clear return */ restore_state: RETURN (DB); RESTORE_STACK RESTORE_FRAME .ENDSEG;