Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ADD_Instruction implements Instruction {
- public final int rd, rs, rt;
- public ADD_Instruction(int rd, int rs, int rt) {
- this.rd = rd;
- this.rs = rs;
- this.rt = rt;
- }
- public void execute(Program p) {
- p.setRegister(this.rd, (p.getRegister(rs) + p.getRegister(rt)));
- }
- }
Add Comment
Please, Sign In to add comment