Updated main.c added a few functions

several helper functions added for episode 20 almost to test phase version of the emulator for the cpu - still need to do additional opcodes.