To edit instructions, follow the procedure described below.
Double-click an instruction you want to edit, or while the caret is moved to the subject instruction, select [Edit Disassemble] from the context menu, and the subject you're going to edit is placed into the edit mode.
Edit the character string of the instruction directly from the keyboard.
Press the [Enter] key when you've finished editing, and the altered instruction is automatically line-assembled and the resulting code is written into memory.
However, if this alteration results in an invalid instruction, the character string you've edited is displayed in red color and not written into memory.
Note that if space is created in memory by overwriting the disassembled result being displayed on panel with another instruction, bytes are automatically compensated for with nop instructions as in the example shown below.
When the ADD instruction on third line (6-byte instruction) is overwritten with a BCLR instruction (4-byte instruction) |
5020 AND [R2].UB,R0 99e0 MOV.W 0CH[R6],R0 700fb98a322a ADD #2A328AB9H,R0,R15 5327 AND R2,R7 |
|
5020 AND [R2].UB,R0 99e0 MOV.W 0CH[R6],R0 f22a45b2 BCLR #2,0B245H[R2] 03 NOP 03 NOP 5327 AND R2,R7 |
When an MOV.W instruction on second line (2-byte instruction) is overwritten with a BCLR instruction (4-byte instruction) |