This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

illegal word operand

the code in asm

-5 0000018A D4500200 MOV R5,[R0+#0x0002]
-4 0000018E 0000 ADD R0,R0
-3 00000190 0000 ADD R0,R0
-2 00000192 8A370800 JB 0xFD6E.0,0x0001A6
-1 00000196 04000100 ADD DPP0:0x0001,DPP0
00000028 FA002200 JMPS Class_B_trap(0x22)

i suspect JB 0xFD6E.0,0x0001A6 si the instruction that generated the hdw trap
at 0xfd6e is 00h
at 0x1a6 is 08h

what is wrong?
am i looking in the write place?

  • 'Illegal word operand' means 'word read or write on odd address'. Obviously, the instruction
    ADD DPP0:0x0001,DPP0
    is the reason. The address DPP0:0x0001 is odd.
    I think your problems began a little earlier than this instruction. The instructions above the one causing the trap don't make any sense at all. Most likely the program went astray and the CPU began executing invalid code. Look for a bug in your code.

    - mike