2012-12-19, 12:42 AM
It is possible to debug a zxbasic program in any emulator but at BASIC level (not assembler) using the debug information generated on compiling time?
|
debug information
|
|
2012-12-19, 12:42 AM
It is possible to debug a zxbasic program in any emulator but at BASIC level (not assembler) using the debug information generated on compiling time?
2012-12-19, 09:42 AM
Yes, there are commands for compiler to check memory and arrays, and you can add PRINT commands an remove them later.
I would like to have a DEBUG command which works like similar like PRINT, but on a protected window area, ignored in normal mode, but activated in Debugging mode. Code: DEBUG "Reached part 7"
DEBUG n
debug "Test nr "+str(testnr)
------------------------------------------------------------
http://lcd-one.da.ru redirector is dead Visit my http://members.inode.at/838331/index.html home page!
2012-12-19, 10:02 AM
wilco2009 Wrote:It is possible to debug a zxbasic program in any emulator but at BASIC level (not assembler) using the debug information generated on compiling time?The first thing to implement (yes, I'm very slow this year, but it's going to change soon) is the memory DUMP in asm :roll: I've also think in what you comment. I was implementing my own emulator-debugger, but need more info on Z80 (e.g. my emulator resets after the "©1982 Sinclair Research Ltd." message and can't traced why.
2012-12-19, 10:27 AM
LCD Wrote:Yes, there are commands for compiler to check memory and arrays, and you can add PRINT commands an remove them later.Hmm nice. However, you can implement some sort of debugging using C-like macros. In C they do this way: Code: ' Just an example of DEBUG implementation
#ifdef __DEBUG__
' This is our DEBUG command, it could be an asm routine, etc.
# define DEBUG PRINT AT 20,0;
#else
'If __DEBUG__ is not defined, just replace DEBUG with REM so nothing is compiled
# define DEBUG REM
#endif
'If __DEBUG__ is defined, DEBUG macro will be active.
#define __DEBUG__
DIM x = 20
DEBUG "x="; x
2012-12-20, 12:26 AM
The spectaculator debuguer is very good, but is only for assembler (or need a specific format for debugger file).
I`m not sure if is possible to get contact with the programmers team of spectaculator to colaborate in a high level debugging.
2012-12-21, 01:03 AM
boriel Wrote:LCD Wrote:Yes, there are commands for compiler to check memory and arrays, and you can add PRINT commands an remove them later.Hmm nice. However, you can implement some sort of debugging using C-like macros. In C they do this way: Thats a solution... I currently use PRINT, but the area is not protected against overwritting by other screen output.
------------------------------------------------------------
http://lcd-one.da.ru redirector is dead Visit my http://members.inode.at/838331/index.html home page!
2012-12-21, 07:43 AM
LCD Wrote:Yes I do it also, and is useful but is not a debuger.boriel Wrote:LCD Wrote:Yes, there are commands for compiler to check memory and arrays, and you can add PRINT commands an remove them later.Hmm nice. However, you can implement some sort of debugging using C-like macros. In C they do this way: The advantage of a debuger is the possibility to freezze the program in a point and trace step by step. |
|
« Next Oldest | Next Newest »
|