Hi,H.P. de Vries! 13-Feb-98 20:11 you wrote about "Re: CASE-statement?" > > > I hope someone can help me with this, because I dont have any bright > > > ideas right now ;) Is there a nifty little piece of code out there > > > what does the same as the "case", e/g/ "switch" statement? [^Y] > > CASE: > > XORLW 1 > > BZ W_CONTAINED_1 [^Y] > Thanks for this one! > But what is that faster way (if you happen to know). My case-statement > would have to check W=0...9 (0x0F maybe ) so the short one should work. 1) (0..9 and 0x0F) or 2) today 0..9, tomorrow 0..0x0F ? In the second case use simply jump table as John Payson say. First case may be transformed to second by incrementing key code. incf key,w andlw 0x0F 0..9 shifted to 1..10, 0x0F becomes 0. We have codes 0..10 without "holes". > What does BZ do btw. I cant find it anywhere in the MPLAB help-files. This is "standard" built-in macro btfsc STATUS,Z goto xxx AFAIK, MPASM support it. -- /* Alexandr Redchuk ReAl@real.kiev.ua */