You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The AS macro assembler has a charset directive, which allows to re-map ASCII-characters to non-standard values. AS projects that aren't careful with this macro may easily corrupt MD Debugger's string output if charset is not restored to the default one.
Per AS documentation, using charset directive without arguments should restore the default charset. MD Debugger macros can always do so before outputting strings unless there are performance concerns against this. Alternatively, charset may be called once before generating texts for exception handlers.
Example of charset pollution
The following was the output of _ErrorMessage macro in one the project that reported this bug:
1906D4 : =$0 .__lpos: set0; start position
1906D4 : ; Write part of "ADDRESS ERROR" before the end
1906D4 : 1C44 44521653dc.b substr("ADDRESS ERROR", .__lpos, 0), 0
1906DA : 53FF 1652 524F
1906E0 : 5200
Actual bytes it outputs for "ADDRESS ERROR" string:
1C44 4452 1653 53FF 1652 524F 5200
However, here's how "ADDRESS ERROR" ASCII-string should look like:
The AS macro assembler has a
charset
directive, which allows to re-map ASCII-characters to non-standard values. AS projects that aren't careful with this macro may easily corrupt MD Debugger's string output if charset is not restored to the default one.Per AS documentation, using
charset
directive without arguments should restore the default charset. MD Debugger macros can always do so before outputting strings unless there are performance concerns against this. Alternatively,charset
may be called once before generating texts for exception handlers.Example of charset pollution
The following was the output of
_ErrorMessage
macro in one the project that reported this bug:Actual bytes it outputs for "ADDRESS ERROR" string:
However, here's how "ADDRESS ERROR" ASCII-string should look like:
This was caused by charset pollution earlier in the project's code.
The text was updated successfully, but these errors were encountered: