[Coco] ZBUG

Wayne Campbell asa.rand at gmail.com
Tue Jun 6 12:37:36 EDT 2017


Not related to assembler, but I also use my own code for debugging in
Basic09. The built-in debugger in Basic09 is great, and I use that when the
program I'm working on can run in the editing environment, but when you
have to pack the code and run it from the command line, there is no
debugger to use. I started including a simple mechanism where I have a
variable that I increment in values throughout the code. I have this value
printed in the case of an error in the error trap. This way I know about
where in the code the problem is occurring. If I need specifics of what
values variables may contain, I can print them out in the error trap as
well. If the problem is not causing an error, but is just bad data, I can
isolate the problem this way. It's very handy doing it like this when you
have to run from the command line in packed form. Sorry if this is OT for
this thread, but I felt like I should share this.


On Tue, Jun 6, 2017 at 6:05 AM, Gene Heskett <gheskett at shentel.net> wrote:

> On Tuesday 06 June 2017 00:34:52 Dave Philipsen wrote:
>
> > This is just a personal opinion but I played around with the debugger
> > built into EDTASM many years ago when I first acquired the program
> > pak.  I've also played around with a few debuggers over the years.
> > And I've had some real head-scratchers at times too.  But for me, I
> > always seem to get the problem figured out by writing a little custom
> > debug code into my program.  A lot of times I'll use an assembler
> > conditional or a flag in the program that turns on my debug mode.  I
> > may write a little subroutine that, when called, does a dump of all of
> > the registers and displays their contents or something like that.  It
> > always seems  to be easier than trying to run a debugger.  And usually
> > it's just something simple like the use of the wrong addressing mode
> > or the stack is not restored correctly or something like that.
>
> That particular function, which is handier than the lock on the outhouse
> door at a family reunion, is f$regsdump in os9/nitros9;
>  pshs cc
>  os9 F$regsdump
>  puls cc
> No effect on your running program, but you've got a full processor dump
> on screen.
>
> > Dave
> >
> > > On Jun 4, 2017, at 10:34 PM, John Mark Mobley
> > > <johnmarkmelanie at gmail.com> wrote:
> > >
> > > I am using a cross asembler.
> > > I want to debug my code in XRoar.  I am using Linux.
> > >
> > > I can run edtasm+ from a ROM cartridge, run zbug and load my code
> > > from the cassette interface into RAM.
> > >
> > > I can run disk-edtasm and just load zbug.  And load my code from the
> > > floppy interface so that it does not overwrite zbug.  How do I know
> > > what address is safe?
> > >
> > > Are there other options.
> > >
> > > -John Mark Mobley
> > >
> > > --
> > > Coco mailing list
> > > Coco at maltedmedia.com
> > > https://pairlist5.pair.net/mailman/listinfo/coco
>
>
> Cheers, Gene Heskett
> --
> "There are four boxes to be used in defense of liberty:
>  soap, ballot, jury, and ammo. Please use in that order."
> -Ed Howdershelt (Author)
> Genes Web page <http://geneslinuxbox.net:6309/gene>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>



-- 
Wayne

The Structure of I-Code
http://www.cocopedia.com/wiki/index.php/The_Structure_of_I-Code

decode
http://cococoding.com/wayne/


More information about the Coco mailing list