Weird SimHC12 Problem - RTS sets PC to 0.

Thread Starter

Zaraphrax

Joined Mar 21, 2009
49
Hi all,

I'm not sure if there's anyone here who's using SimHC12 (http://hcs12text.com/68hc12.html), but I'm going to ask just in case.

I'm currently using this software for an assignment and there's at least one other person that's having this drama. What happens is, when you load the .s19 file into the simulator, the program runs fine (both in continuous and step mode) until it hits an "RTS" instruction. At which point, the program counter resets to 0000. This is very frustrating. I'm on Windows 7, the other guy is on Windows XP. We've both tried uninstalling and reinstalling, updating Java etc but it just doesn't seem to want to play nice.

Does anybody have any info which could help us out?

Cheers.

Post-script Edit - Could this have something to do with the stack?
 

Thread Starter

Zaraphrax

Joined Mar 21, 2009
49
Nevermind - I worked out forgot to do an LDS instruction, so there was no stack to save the program counter too (I'm a newbie at this, so forgive my ignorance). Thanks to those who read this though.
 
Top