py65
py65 copied to clipboard
Feature Request: a "continue" command
When using several breakpoints, I find myself having to look at the PC and then typing goto <pc_value_here> when I want to continue on to the next breakpoint. I'd like to be able to type something like continue and then just press enter to keep continuing through the breakpoints.
Once I get my input pull request all figured out, I believe I can write this myself and issue a pull request for it if you think it would be useful to others.
Is there any preference for the name of such a command? I was thinking "continue" but perhaps "run" would be better?
I'm fooling around with ideas for a simulator for the 65816 and have had the same thought. In my, ah, simulations of the simulations (CLI), "run" tends to be confusing even to me because it could mean "start from the beginning". I was thinking of going with "resume", which is "continue" in shorter?
You can use return to continue running from the current PC.
The issue with return is that it stops at the next RTS or RTI where I want to run until the next breakpoint.
Ugh, you are right.
How does go sound for the name of the command? Worked slick while working on a 6502 project I just finished yesterday.
go sounds pretty good.
I was trying to find a name that didn't start with the same letters as any of the other commands (go has the same start as goto, for example) because I use tab completion a lot. It's not that big a deal, however, because once I get the right command once, I can just hit up arrow to recall it. go is also so short that tab completion would be silly. It would be nice if pressing enter (after running the command once) would do it again (the way it works for step). This is useful for when I have set a breakpoint, but need to stop on the third (or whatever) iteration.
If go did the goto behavior when given an address (and the "continue" behavior when no argument was given) then the tab completion stuff wouldn't really matter. It might be worth moving the g shortcut to go in that case. That way g 2000 would still work fine, and just g would go from the current PC.
Are you planning on implementing this? I was planning on doing it a while ago (note the original date of this issue is from January), but I fell down a rabbit hole while trying to get copy/paste working nicely with py65mon on linux and discovering the idiosyncrasies of stdin on Linux/Mac/Win made it a real pain. I think it's simple enough, it doesn't really matter who does it. Let me know if you want to implement it - otherwise I will get to it eventually.
I submitted a the change for go with tests yesterday. (I have a couple more useful enhancements to package for submission.)
Pressing Enter works for repeating go or any other command of your choice.
To avoid duplicating goto I decided to leave go without arguments. I also left goto's shortcut (g) alone, to avoid confusing people used to it. Since go is so short, it effectively does not have a shortcut.