/* This C language subroutine returns non-zero if the input is a punctuation 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 #include
int ispunct(int c); */ #include "lib_glob.h" #include "cty_glob.h" .SEGMENT/CODE Code_Space_Name; .FILE RTL_FILENAME; .GLOBAL _ispunct; _ispunct: R2=47; COMP(R4,R2), R0=dm_1; /* Set return to true*/ IF GT JUMP (PC, test_2); R2=33; COMP(R4,R2), FETCH_RETURN /* In case I go to restore state*/ IF GE JUMP (PC, restore_state); test_2: R2=64; COMP(R4,R2), FETCH_RETURN /* In case I jumped before I did FETCH*/ IF GT JUMP (PC, test_3); R2=58; COMP(R4,R2); IF GE JUMP (PC, restore_state); test_3: R2=96; COMP(R4,R2); IF GT JUMP (PC, test_4); R2=91; COMP(R4,R2); IF GE JUMP (PC, restore_state); test_4: R2=123; COMP(R4,R2); IF LT R0=R0-R0; R2=126; COMP(R4,R2); IF GT R0=R0-R0; restore_state: RETURN (DB); RESTORE_STACK RESTORE_FRAME .ENDSEG;