You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
403 B
Rust
18 lines
403 B
Rust
7 months ago
|
use zingprocmacros::make_instruction_type;
|
||
|
|
||
|
struct ZsciiString;
|
||
|
|
||
|
make_instruction_type!{MyInstruction {
|
||
|
1 FirstInst,
|
||
|
0b10 SecondInst st,
|
||
|
3u8 ThirdInst br txt,
|
||
|
12 FourthInst txt,
|
||
|
0xC FifthInst br,
|
||
|
}}
|
||
|
|
||
|
fn main() {
|
||
|
let one = MyInstruction::FirstInst;
|
||
|
let two = MyInstruction::SecondInst { store: 0 };
|
||
|
let three = MyInstruction::ThirdInst { branch: 0, text: ZsciiString };
|
||
|
}
|