# Copyright (c) 1979 Regents of the University of California
# char sccsid[] = "@(#)23case.s 4.1 10/10/80";
cvtwl (r10)+,r0 #r0 has length of case table
movaw (r10)[r0],r2 #r2 has pointer to cases
cvtwl (sp)+,r3 #r3 has case element to find
locc r3,r0,(r2) #find case element
beql caserr #case not found
cvtwl (r10)+,r0 #r0 has length of case table
movaw (r10)[r0],r1 #r1 has pointer to cases
movl r1,r2 #save base pointer
movzwl (sp)+,r3 #r3 has case element to find
cmpw r3,(r1)+ #search for case
cvtwl (r10)+,r0 #r0 has length of case table
movaw (r10)[r0],r1 #r1 has pointer to cases
movl r1,r2 #save base pointer
movl (sp)+,r3 #r3 has case element to find
cmpl r3,(r1)+ #search for case