All pastes #753328 Raw Edit

Stuff

public text v1 · immutable
#753328 ·published 2007-10-29 03:37 UTC
rendered paste body
	decode:
		printState(&state, "decode");
		if(!memoryAccess(&state,1)) goto decode;
		bus = state.memoryData;
		state.instrReg = bus;
		goto instr;
	
	instr:
		printState(&state, "instr");
		if(state.instrReg>>22==ADD) goto add;
		if(state.instrReg>>22==NAND) goto nand;
		if(state.instrReg>>22==LW) goto lw;
		if(state.instrReg>>22==SW) goto sw;
		if(state.instrReg>>22==BEQ) goto beq;
		if(state.instrReg>>22==JALR) goto jalr;
		if(state.instrReg>>22==HALT) goto halt;
		if(state.instrReg>>22==NOOP) goto noop;