3 ms·
I'm pleased with that part, but I'm ashamed of my ror12 function :p I'd love it if anyone could suggest a better way to do it.
by oconnor663 5y ago
I'm pleased with that part, but I'm ashamed of my ror12 function :p I'd love it if anyone could suggest a better way to do it.
- Someone 5y agohttp://6502.org/source/general/SWN.html http://6502.org/source/general/SWN.html swaps the nybbles in A in 8 bytes/12 cycles. That’s not quite what you need, but may give you ideas.
- oconnor663 5y agoOh that looks perfect. I'll have to try it out today and report back.
- jacquesm 5y agoIf you want to be on the far end of the speed/space trade off you could simply use a lookup table. That should speed things up considerably. You'd index it by byte (split the tables, save one shift left) and then recombine the results.