From 5d32e6a3936af7594ab046c66a5240b350a2bea7 Mon Sep 17 00:00:00 2001 From: Ben Bridle Date: Mon, 9 Nov 2026 18:03:35 +1300 Subject: Add little endian format 'raw-le' This is the same as 'raw', but produces bytes in little-endian order. --- src/bin/tq.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/bin/tq.rs') diff --git a/src/bin/tq.rs b/src/bin/tq.rs index 885c46c..7970017 100644 --- a/src/bin/tq.rs +++ b/src/bin/tq.rs @@ -97,6 +97,8 @@ Output formats: raw Assembled words are converted to big-endian bytestrings and concatenated. Each word is padded to the nearest byte. Words must all be the same width. + raw-le + Same as 'raw', but converts words to little-endian bytestrings instead. source Print the source file before assembly, with symbols resolved. "); @@ -183,7 +185,8 @@ Output formats: Format::Debug => format_debug(&segments), Format::Inhx => format_inhx(&segments), Format::Inhx32 => format_inhx32(&segments), - Format::Raw => format_raw(&segments, width), + Format::Raw => format_raw(&segments, width, Endian::Big), + Format::RawLE => format_raw(&segments, width, Endian::Little), Format::Source => unreachable!("Source output is handled before full assembly"), }; match result { -- cgit v1.3.1