This PR collects a number of small extensions and improvements I made to py65 as I went along:
(b)atch command: I had a bunch of setup commands for labels etc that I repeated on each launch. I initially did cat setup.cmd - | py65 which sort of works but it doesn't echo the input lines making the input confusing. The batch command and command-line option reads a file to the existing cmd.cmdqueue buffer and tracks whether to echo each command as it's executed, as if typed interactively.
(c)ontinue: to continue from current PC to next breakpoint, also suggested in https://github.com/mnaberez/py65/issues/51 I prefer continue to go based on other debuggers and go feeling too close to goto. Another option would be to support goto without an address
support for implied and relative address ranges. Omitting the start address in a range continues from the end of the last address range. Writing a range with a / separator interprets the second value as a length rather than an absolute address. This works for disassemble, fill and mem making it easier to step through chunks of code/memory. Hitting enter to repeat a last command like d /20 will disassemble the next 20 bytes (aligning to the end of the last instruction).
updated doc including a note about ;-style comments I discovered but hadn't seen written anywhere.
as a personal preference I compacted the MPU summary from two lines to one which imho makes it much easier to compare changes as you step thru code. This could also be a command-line switch I guess? Here's the before and after:
PC AC XR YR SP NV-BDIZC
6502: 0000 00 00 00 ff 00110000
py65 has been super useful while taking apart an old atari game (see work in progress https://github.com/patricksurry/eastern-front-1941/)
This PR collects a number of small extensions and improvements I made to
py65
as I went along:(b)atch
command: I had a bunch of setup commands for labels etc that I repeated on each launch. I initially didcat setup.cmd - | py65
which sort of works but it doesn't echo the input lines making the input confusing. The batch command and command-line option reads a file to the existingcmd.cmdqueue
buffer and tracks whether to echo each command as it's executed, as if typed interactively.(c)ontinue
: to continue from current PC to next breakpoint, also suggested in https://github.com/mnaberez/py65/issues/51 I prefercontinue
togo
based on other debuggers andgo
feeling too close togoto
. Another option would be to supportgoto
without an addresssupport for implied and relative address ranges. Omitting the start address in a range continues from the end of the last address range. Writing a range with a
/
separator interprets the second value as a length rather than an absolute address. This works fordisassemble
,fill
andmem
making it easier to step through chunks of code/memory. Hitting enter to repeat a last command liked /20
will disassemble the next 20 bytes (aligning to the end of the last instruction).ascii|noascii
option for themem
command to append an ascii representation of each line. This is useful for understanding string tables etc:updated doc including a note about
;
-style comments I discovered but hadn't seen written anywhere.as a personal preference I compacted the MPU summary from two lines to one which imho makes it much easier to compare changes as you step thru code. This could also be a command-line switch I guess? Here's the before and after:
6502: PC=0000 A=00 X=00 Y=00 SP=ff FLAGS=