![]() |
Spectrum resets - Printable Version +- Forum (https://www.boriel.com/forum) +-- Forum: Compilers and Computer Languages (https://www.boriel.com/forum/forumdisplay.php?fid=12) +--- Forum: ZX Basic Compiler (https://www.boriel.com/forum/forumdisplay.php?fid=11) +---- Forum: Help & Support (https://www.boriel.com/forum/forumdisplay.php?fid=16) +---- Thread: Spectrum resets (/showthread.php?tid=487) |
Spectrum resets - slenkar - 08-15-2012 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) Re: Spectrum resets - boriel - 08-15-2012 slenkar Wrote:I was programming the same game and the speccy resets, is there a way of telling which line it crashes on?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. Re: Spectrum resets - britlion - 08-15-2012 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. Re: Spectrum resets - slenkar - 08-16-2012 It was too much recursion Re: Spectrum resets - boriel - 08-17-2012 You can start your program in a higher memory address. The stack is always below 32768 (well, I *suppose* CLEAR does that :? ![]() 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. Re: Spectrum resets - slenkar - 08-17-2012 it was my mistake, infinite recursion :oops: ![]() |