Skip to content

Instantly share code, notes, and snippets.

@matthewjberger
Created July 29, 2022 03:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthewjberger/a7a96450a20c053238f0b0ed1e49640e to your computer and use it in GitHub Desktop.
Save matthewjberger/a7a96450a20c053238f0b0ed1e49640e to your computer and use it in GitHub Desktop.
Opcodes in rust
#[repr(u8)]
pub enum Opcode {
Null,
First,
}
fn main() {
println!("0b{:08b}", Opcode::First as u8);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment