mirror of
https://github.com/kmc7468/cs420.git
synced 2025-12-16 07:28:52 +00:00
Add .zero directive
This commit is contained in:
@@ -95,6 +95,8 @@ pub enum Directive {
|
|||||||
Word(u32),
|
Word(u32),
|
||||||
/// .quad value
|
/// .quad value
|
||||||
Quad(u64),
|
Quad(u64),
|
||||||
|
/// .zero bytes
|
||||||
|
Zero(usize),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Directive {
|
impl Directive {
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ impl WriteString for Directive {
|
|||||||
Self::Half(value) => format!(".half\t{:#x?}", value),
|
Self::Half(value) => format!(".half\t{:#x?}", value),
|
||||||
Self::Word(value) => format!(".word\t{:#x?}", value),
|
Self::Word(value) => format!(".word\t{:#x?}", value),
|
||||||
Self::Quad(value) => format!(".quad\t{:#x?}", value),
|
Self::Quad(value) => format!(".quad\t{:#x?}", value),
|
||||||
|
Self::Zero(bytes) => format!(".zero\t{:#x?}", bytes),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user