summaryrefslogtreecommitdiff
path: root/src/bin/tq.rs
diff options
context:
space:
mode:
authorBen Bridle <ben@derelict.engineering>2026-11-09 18:03:35 +1300
committerBen Bridle <ben@derelict.engineering>2026-11-09 18:04:39 +1300
commit5d32e6a3936af7594ab046c66a5240b350a2bea7 (patch)
tree7cd391bbd9cdb2869db7bdda2307251d27d9c7d5 /src/bin/tq.rs
parent255fd76c527026387b0f074d5a3f9808037ca449 (diff)
downloadtorque-asm-5d32e6a3936af7594ab046c66a5240b350a2bea7.zip
Add little endian format 'raw-le'HEADmain
This is the same as 'raw', but produces bytes in little-endian order.
Diffstat (limited to 'src/bin/tq.rs')
-rw-r--r--src/bin/tq.rs5
1 files changed, 4 insertions, 1 deletions
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 {