From fb836cb4cae07b2c66a41ad1413a8cab1a080e6a Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Tue, 14 Jan 2025 21:07:07 +0100 Subject: Implement the .res control statement MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Similarly to other assemblers, this allows the programmer to write a definite amount of bytes with the same values. Compared to other assemblers there are two things to notice. First, there is a limit to it (i.e. whatever can fit in 2 bytes). Second, if the fill value is not provided, then it will default to the current mapping's fill value, or just 0x00 if the current mapping doesn't define one of its own. Signed-off-by: Miquel Sabaté Solà --- lib/xixanta/src/node.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/xixanta/src/node.rs') diff --git a/lib/xixanta/src/node.rs b/lib/xixanta/src/node.rs index 1ec2ed9..8fc3c73 100644 --- a/lib/xixanta/src/node.rs +++ b/lib/xixanta/src/node.rs @@ -141,6 +141,7 @@ pub enum ControlType { StartRepeat, EndRepeat, IncludeSource, + ReserveMemory, } impl fmt::Display for ControlType { @@ -162,6 +163,7 @@ impl fmt::Display for ControlType { ControlType::StartRepeat => write!(f, ".repeat"), ControlType::EndRepeat => write!(f, ".endrepeat"), ControlType::IncludeSource => write!(f, ".include"), + ControlType::ReserveMemory => write!(f, ".res"), } } } -- cgit v1.2.3