pseudocode for the poiner setup for looping through instmem