comparison lwasm/lwasm.c @ 359:f50a54d0293a

Indexed part 1
author lost@starbug
date Wed, 31 Mar 2010 21:57:45 -0600
parents 0cf4948d53b4
children d96c30e60ddf
comparison
equal deleted inserted replaced
358:be0f9f8d799f 359:f50a54d0293a
578 (*p)++; 578 (*p)++;
579 else 579 else
580 (*p) += 2; 580 (*p) += 2;
581 return rval; 581 return rval;
582 } 582 }
583
584 int lwasm_lookupreg3(const char *regs, char **p)
585 {
586 int rval = 0;
587
588 while (*regs)
589 {
590 if (toupper(**p) == *regs)
591 {
592 if (regs[1] == ' ' && !isalpha(*(*p + 1)))
593 break;
594 if (toupper(*(*p + 1)) == regs[1])
595 {
596 if (regs[2] == ' ' && !isalpha(*(*p + 2)))
597 break;
598 if (toupper(*(*p + 2)) == regs[2])
599 break;
600 }
601 }
602 regs += 3;
603 rval++;
604 }
605 if (!*regs)
606 return -1;
607 if (regs[1] == ' ')
608 (*p)++;
609 else if (regs[2] == ' ')
610 (*p) += 2;
611 else
612 (*p) += 3;
613 return rval;
614 }