fn comma_transformation(
leading_commas: Option<&Commas>,
value: Unsigned36Bit,
trailing_commas: Option<&Commas>,
) -> Unsigned36Bit
Expand description
Implement the value transformation rules described in the table “COMMA CHART” in section 6-2.4, “NUMERICAL FORMAT - USE OF COMMAS” of the Users Handbook.
It’s likely that the TX-2’s original implementation of this in the M4 assembler used the system configuration feature to perform the word-quarter masking and mapping. While we could do that it would introduce a dependency between the assembler and the siimulator’s implementation of the exchange unit. Generating the correct system configuration value would be more or less as complex as just implementing the logic here, so we just implement it here in order to avoid the dependency.