/* This C language subroutine compares two strings in the current locale. Since only the standard locale is provided, this is a duplicate of strcmp. The Run Time Library for the C Language. Gordon A. Sterling (617) 461 - 3076 DSP Development Tools Engineering Created on 4/30/90 Updated on 5/94 by AS Updated on 3/95 by AS - separated polymorphic functions #include
int strcoll(const char *s1, const char *s2); */ #include "lib_glob.h" #include "str_glob.h" .SEGMENT/CODE Code_Space_Name; .FILE RTL_FILENAME; .GLOBAL ___strcollPP; ___strcollPP: strcoll_core: R0=PASS R8, R12=pma_i; R2=PASS R4, pm_ptr=R0; /*Point to s2*/ pm_vs_pm: pma_i=R2; /*Point to s1*/ R2=PM(pma_i,1); /*Read *s1*/ DO pm_pm UNTIL FOREVER; R2=PASS R2, R0=PM(pm_ptr,1); /*Read *s2*/ IF EQ JUMP (PC, restore_state) (LA); R0=R2-R0, R2=PM(pma_i,1); pm_pm: IF NE JUMP (PC, restore_state) (LA); restore_state: FETCH_RETURN pma_i=R12; RETURN (DB); RESTORE_STACK RESTORE_FRAME .ENDSEG;