Update memSim.c

Initial commit to get us running... I have not compiled it.