1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//! Defines the opcodes for the `feo3boy` gameboy.
//!
//! This library is intended to provide the basic opcodes of the gbz80 CPU. Opcodes are
//! defined in terms of a microcode which allows instructions to be broken into smaller
//! steps.
//!
//! The [`microcode`] module supplies the [`Microcode`][microcode::Microcode] type, which
//! defines the steps that opcodes can be broken down into.
//!
//! The [`opcode`] module supplies [`Opcode`][opcode::Opcode] and
//! [`CBOpcode`][opcode::CBOpcode] which define the actual instructions the GameBoy CPU
//! can execute.
/// Helper function for getting the size of an array as a constant by reference. This is
/// used to implement `count_repetition`.
pub const
/// Counts the number of repetitions in a macro invocation. Produces a constant
/// expression.
///
/// Usage:
/// ```
/// # use feo3boy_opcodes::count_repetition;
/// count_repetition!(a, 3, (), {}, 4, foo);
/// ```