chore: Update comments

This commit is contained in:
2025-05-13 14:25:32 +09:00
parent 6908fb3c69
commit 3cb3f8d4b1

View File

@@ -5,7 +5,7 @@ pub type ImmediateWord = u16;
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
#[allow(dead_code)] #[allow(dead_code)]
/// Can be used to encode either byte or word operands /// Encodes either Byte- or Word-sized operands.
pub enum ImmediateOperand { pub enum ImmediateOperand {
Byte(ImmediateByte), Byte(ImmediateByte),
Word(ImmediateWord), Word(ImmediateWord),
@@ -23,7 +23,7 @@ impl fmt::Display for ImmediateOperand {
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
#[allow(dead_code)] #[allow(dead_code)]
/// A single 'line' of executable ASM is called an Instruction, which /// A single 'line' of executable ASM is called an Instruction, which
/// contains the `Opcode` that will be executed, alongside its starting offset /// contains the `Mnemonic` that will be executed, alongside its starting offset
/// and the raw parsed bytes /// and the raw parsed bytes
pub struct Instruction { pub struct Instruction {
pub start: usize, // location of the instruction start pub start: usize, // location of the instruction start
@@ -53,7 +53,8 @@ impl fmt::Display for Instruction {
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
#[allow(dead_code, non_camel_case_types)] #[allow(dead_code, non_camel_case_types)]
/// All possible opcode variantions. /// All possible mnemonic variantions.
/// These are sorted by type and are not in hex-encoding order.
// XXX: convert this copy and paste horror in a proc macro like // XXX: convert this copy and paste horror in a proc macro like
// enum Opcode { // enum Opcode {
// #[derive(default_variations)] // #[derive(default_variations)]
@@ -185,9 +186,9 @@ impl fmt::Display for Mnemonic {
} }
} }
/// Registers of a 8086 processor
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
#[allow(dead_code)] #[allow(dead_code)]
/// Registers of a 8086 processor
pub enum Register { pub enum Register {
// 8 bit // 8 bit
// low bytes // low bytes