From 1410c98545d00c8508a715a566cf8e3e4e424773 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Fri, 24 Apr 2026 22:29:47 +0200 Subject: Add a big endian control statement MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit By default everything is little endian, and that should always be the case. That being said, if a literal is better expressed in big endian format for whatever reason, you can now use the .be or the .bigendian control statements. The terribly named .dbyt control statement can also be used for this purpose, but that's just to be compatible with the implementation from ca65. 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 af76edd..ee3ae24 100644 --- a/lib/xixanta/src/node.rs +++ b/lib/xixanta/src/node.rs @@ -155,6 +155,7 @@ pub enum ControlType { Segment, Byte, Word, + BigEndianWord, Addr, IncBin, StartRepeat, @@ -187,6 +188,7 @@ impl fmt::Display for ControlType { ControlType::Segment => write!(f, ".segment"), ControlType::Byte => write!(f, ".byte/.db"), ControlType::Word => write!(f, ".word/.dw"), + ControlType::BigEndianWord => write!(f, ".dbyt/.be/.bigendian"), ControlType::Addr => write!(f, ".addr"), ControlType::IncBin => write!(f, ".incbin"), ControlType::StartRepeat => write!(f, ".repeat"), -- cgit v1.2.3