Created
July 29, 2022 03:54
-
-
Save matthewjberger/a7a96450a20c053238f0b0ed1e49640e to your computer and use it in GitHub Desktop.
Opcodes in rust
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
#[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