before you go nuts i thought you'd like to know that SUBLW 0x06 ;no just d3-d0 does NOT subtract 6 from the W register. this really subtracts the W register from 6, not exactly what you wish. the trick i use to get around this one is to add -6 ADDLW 0x00-0x06 ; subtract 6 from W michael