i'm making a small pascal to pic compiler and i've got much of it working but now i'm stuck on the solver. i've tried so much at trying to make on that just work for simple equations but it just won't work! i need to turn a line like this:

bitmask := 2 * (position + RCX_bit);

into:

move position to w
add RCX_bit to w
multiply w with 2
move w to bitmask

just a list of the operations done in the right order..

maybe this wasn't the best example to give but please ask questions if i wasn't clear enough

Many Regards
Jeppe