Operating Systems/OS_Assg2_pipes-main/myexpos/xsm/registers.c
int registers_get_register_code(const char *name)
{
    int i;

    for (i = 0; i < XSM_NUM_REG; i++)
        if (!strcasecmp(name, _register_names[i]))
            return i;

    return -1;
}
/* Returns the register code for the given register name */
Returns the register code for the given register name
Returns the register code for the given register name
int registers_get_register_code(const char *name)
{
    int i;
    for (i = 0; i < XSM_NUM_REG; i++)
        if (!strcasecmp(name, _register_names[i]))
            return i;
    return -1;
}
int registers_get_register_code ( const char * name ) { int i ; for ( i = 0 ; i < XSM_NUM_REG ; i ++ ) if ( ! strcasecmp ( name , _register_names [ i ] ) ) return i ; return -1 ; }
Returns the register code for the given register name
Returns the register code for the given register name