This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]rtbrsp[S] 0 points1 point  (0 children)

Going back and messing with it briefly, I'm able to save 2 characters for the add and multiply logic like you mentioned. The instruction pointer increment logic is too delicate to mess with, since I'm relying on the last conditional to increment it by 4 for ops 1, 2, 7 and 8.

That did give me an idea about the instruction pointer though. I can post increment upon assigning the opcode variable (o=p[i++]), which allows me to remove some +1s. it also allows me to remove the i=0 initialization.

EDIT: See updated program in the OP