Replying to myself. On Sat, 29 Sep 2012, Steve Nickolas wrote:
http://1.buric.co/lrrbcd.zip
The C implementation, which is all shifts, ands and ors, works fine, but I tried to implement lrunrbcd in 6502 asm and just had a mess of code that didn't work right (I took some shortcuts).
As it acts completely bizarre I dare not post it yet. -uso.