View Single Post
Old 07 August 2018, 10:21   #2
Registered User

Cv365's Avatar
Join Date: Sep 2015
Location: Amigaville
Posts: 21
OK, managed to figure it out myself and posting here in case it helps someone else in the future.

It appears I was using the 'z' debugger command to step through all the instructions. Doing the 'z' command when the PC was at the RTS instruction was what causes the exceptions. If I simply use the 't' command to step through instructions, everything is just fine! D'oh. I stumbled upon this while stepping through another piece of code and I got all sorts of weird exceptions there as well.

I can manage now, but I am still slightly confused as to the workings of the 'z' command. Here's what the help says:

  t [instructions]      Step one or more instructions.
  z                     Step through one instruction - useful for JSR, DBRA etc.
So, obviously 't' steps through every instruction and also dives into subroutines, whereas 'z' will do the whole subroutine and then drop back into the debugger. Why then, does it cause exceptions on certain instructions? Should I *only* use 'z' with JSR, DBRA and the likes? I'd like to know what I am missing here
Cv365 is offline  
Page generated in 0.04684 seconds with 11 queries