Created
November 9, 2009 01:28
-
-
Save qhoxie/229614 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def set(reg: Reg, literal: byte): Code = { | |
return new Code() { | |
// implementation | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static public Code set(final Reg reg, final byte literal) { | |
return new Code () { | |
public void run(State state) { | |
reg.value = literal; | |
state.ticks += 1; | |
} | |
public void emit() { | |
emit("ldi", reg, literal); | |
} | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment