Frank Heckenbach wrote:
(And, BTW, if you want it included in the GPC distribution, please note the GPC Coding Standards. If I'd have to reformat the code or do other significant work with it, I won't do it, see above. Also, please don't change `* $10' to `shl 4' etc., as you did. Write high-level code and leave the low-level optimizations to the compiler.)
AFAIKS intended operation is a shift. So `shl 4' is a high-level specification and `* $10' buys nothing. I can understand that uglyfication to `* 16' gives more portable code, but the unit uses shifts anyway. <rant> I remenber a guy who wanted to use floating point in Linux kernel. He claimed that he have complicated formula very hard to do using integers. It turned out that the formula was turning on/off bits -- floting point was used to do that in BASIC </rant>
So I would say: write what you mean. If it is multiplication, use multiplication, if it is shift, use shift.