Hello, I manage to simulate this using naken_util.
And it will always fail at 1625 cycles, but not for amforth-5.9.

---
cd ~/amforth-6.0/appl/launchpad430
naken_util lp-2553.hex
speed 100
run
---

It always stop at:
"1625 clock cycles have passed since last reset.

Illegal instruction at address 0x0000"

PC before it crash was 0xe064 which is:

$ naken_util -disasm lp-2553.hex |grep 0xe064
0xe064: 0x4630 mov.w @r6+, PC                           3

PC is set to zero and this can be found in:

~/amforth-6.0/msp430/words/execute.asm

;C EXECUTE   i*x xt -- j*x   execute Forth word
;C                           at 'xt'
        CODEHEADER(XT_EXECUTE,7,"execute")
        MOV TOS,W       ; 1 put word address into W
        MOV @PSP+,TOS   ; 2 fetch new TOS
        MOV @W+,PC      ; 2 fetch code address into PC, W=PFA


Do we trust naken_util when debugging amforth on msp430?
Could this be a bug?
------------------------------------------------------------------------------
_______________________________________________
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel

Reply via email to