Sorry, that wasn't the best (unoptimised branch order), besides being
wrong and using the wrong register. I must be having a bad hair day.
Here's the amended version:

* --------------------------------------------------------
         LA    R0,3          Mask for multiple of 4
         NR    R0,R15        Check multiple of 4
         BNZ   BAD_RC        Not so: error
*
         LA    R0,BIG_RC     Lowest invalid RC
         CLR   R15,R0        Check RC within limits
         BL    RC_TREE(,R15) OK: go handle the RC
         B     BAD_RC        Bad: go handle
*
RC_TREE  B     RC0           No error
         B     RC4           Record not found (whatever)
         B     RC8           Zombie attack
         B     RC12          Gross security breach
BIG_RC   EQU   *-RC_TREE     Bigger RCs are invalid
* --------------------------------------------------------

Brent Longborough

Reply via email to