Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Spectrum resets
#1
I was programming the same game and the speccy resets, is there a way of telling which line it crashes on?

(except commenting out loads of lines)
Reply
#2
slenkar Wrote:I was programming the same game and the speccy resets, is there a way of telling which line it crashes on?

(except commenting out loads of lines)
It the spectrum resets there's very little to do at the moment (I was thinking on an emulator).
However, use zxb --help and look for memory checks, array checks and break on and others. Usually many error are reported using the ZX Spectrum ROM Error routine. That is, if you see something like:
345:0 Subscript out of range, sometimes it refers to the REAL 345 line (I can't recall if I implemented this really). Anyway use this only for debugging: it will slow down your program and takes more memory.
Reply
#3
I often end up trackng issues with

asm
DI
HALT
end asm

As a "stop here" code, then use a disassembler to find out what's going on.
Reply
#4
It was too much recursion
Reply
#5
You can start your program in a higher memory address. The stack is always below 32768 (well, I *suppose* CLEAR does that :?Smile.
Anyway there are cases where recursion calls can be tail-optimized (e.g. transforming them into a GOTO). This will be implemented in the future.
Reply
#6
it was my mistake, infinite recursion :oops: Big Grin
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)