made simulation work with program counter indexing into external memory