BASIC 7 IDE

Started by xlar54, June 08, 2007, 01:21 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

xlar54

Well, Ive been toying with a BASIC 7 IDE which uses WinVICE to execute and debug programs written within the IDE.  An idea Ive been playing around with in my head.  So far, I can inject the typed in program into the emulated C128's memory, but the problem is that...well... its timing.  

The easiest direction I took was to "poke" the text into the keyboard buffer, set the appropriate values, and poof - let the built in tokenizer handle the rest.  It works, but the timing is slow due to the need for tokenization on the emulator side.  So, Ill have to tokenize it inside the IDE, and "poke" the resulting program directly into memory.  More complicated than I care to do right now.  But not off the todo list.

Afterward, I want to focus on breakpoints and stepping through a program.  This *should* be easier, but will require a hack to the VICE code.  If I can read the current line number being executed (which I believe is readily possible), then - at the end of the line execution code, flag the emulator to go into a quasi-pause state, we should have stepping through code.

Watches should be trivial - at least reading C128 RAM for variables anyway.  What Ill probably do is have a matrix in the IDE that tracks variables as they are created, and you can open the window to see the variables and their contents. Changing variable values might get complicated, but with some work should be doable as well.

SYS calls will probably not be handled just yet.  Too much detail there that Im not sure I want to get involved with.

Anyway, just was tossing that out.  Ideas or suggestions are welcome.  At some point, Ill pull this all together and put it up for folks to review.

nikoniko

Instead of having your debugger step by whole line numbers, could you step by statement?

Also, in some future incarnation after you have everything else working, it would be great to have an option to write new programs without regard to line numbers, using labels to jump or to call subroutines. Of course, the IDE would still need to maintain line numbers in order to output the tokenized program and handle debugging functions, but it would be nice if the programmer didn't need to think about them.