Added switch statements for opcodes
Base code for writes to b
Basic Instructions (not tested)
parameter write flag