Moira icon indicating copy to clipboard operation
Moira copied to clipboard

Dasm Output/alignment for Illegal Instruction in Moira/MoiraDasm_cpp.h

Open elmerucr opened this issue 3 years ago • 2 comments

Suggestion to change line 104: str << "dc.w " << UInt16{op} << "; ILLEGAL";

Into: str << "dc.w " << tab << UInt16{op} << "; ILLEGAL";

This makes disassembler output more aligned.

elmerucr avatar Oct 08 '22 11:10 elmerucr

Agreed. I'll change

       case DASM_GNU:
       case DASM_GNU_MIT:

           str << ".short " << Int{op};
           break;

       default:

           str << "dc.w " << UInt16{op} << "; ILLEGAL";
           break;

into

        case DASM_GNU:
        case DASM_GNU_MIT:

            str << ".short " << Int{op};
            break;

        case DASM_MUSASHI:

            str << "dc.w " << UInt16{op} << "; ILLEGAL";
            break;

        default:

            str << "dc.w " << tab << UInt16{op} << "; ILLEGAL";
            break;

The change will take effect for DASM styles DASM_MOIRA_MOT and DASM_MOIRA_MIT. I need to keep the Musashi output as it was, because the unit tester does a one-to-one comparison with the Musashi disassembler output.

If you have other disassembler suggestions, please let me know. The two Moira DASM styles can be changed freely.

dirkwhoffmann avatar Oct 08 '22 13:10 dirkwhoffmann

That's great, thank you!

elmerucr avatar Oct 08 '22 14:10 elmerucr

The change is part of the latest checkin.

dirkwhoffmann avatar Nov 11 '22 15:11 dirkwhoffmann