2.6.4.1 Edit instructions

Follow the steps below to edit instructions.

(1)

Switch to edit mode

Double-click the instruction to edit or select [Edit Disassemble] from the context menu after moving the caret to the instruction to edit.

(2)

Edit instructions

Use keyboard to directly edit the instructions.

(3)

Write to memory

Press the [Enter] key to line assemble the edited instructions after editing. The code is automatically written to the memory.

If the edited instruction is invalid, the instruction is shown in red and will not be written to the memory.

 

If there is a space because of overwriting the displayed result of disassembling by another instruction, its byte number is automatically compensated with NOP instruction as follows:

Example 1.

MOVW instruction (4-byte instruction) in the second line is overwritten by DEC instruction (1-byte instruction).

Before editing

0461CF          ADDW AX,#0CF61H
CBF820FE        MOVW SP,#0FE20H
FC8E1800        CALL    !!_funcA
53C0            MOV  B, #0C0H

After editing

0461CF          ADDW AX,#0CF61H
93              DEC  B
00              NOP
00              NOP
00              NOP
FC8E1800        CALL    !!_funcA
53C0            MOV  B, #0C0H

Example 2.

ADDW instruction (3-byte instruction) in the first line is overwritten by MOVW instruction (4-byte instruction).

Before editing

0461CF          ADDW AX,#0CF61H
CBF820FE        MOVW SP,#0FE20H
FC8E1800        CALL    !!_funcA
53C0            MOV  B, #0C0H

After editing

CBF820FE        MOVW SP, #0FE20H
00              NOP
00              NOP
00              NOP
FC8E1800        CALL    !!_funcA
53C0            MOV  B, #0C0H