I have been using b-em, but I have to keep manually checking the memory address against the dasm file and then against the code. Is there a better debugger? I suppose part of the problem is I am using 64tass which has limited bbc support.
I suppose I am asking - what tools do you use? Also, how much effort do you think it would be to change to use a more bbc focussed assembler?
Which debugger do you use?
Re: Which debugger do you use?
I mostly use a customised beebem that loads the labels from beebasm and then displays them while stepping as well as automatically in break points and watches. They are displayed as nearest label +/-offset and auto saved/loaded.
I mainly use b-em for testing and beebem for debugging.
I have only used basic's assembler bitd and beebasm now and never considered changing. I think i would still use beebasm even if I was tempted by another platform.
I mainly use b-em for testing and beebem for debugging.
I have only used basic's assembler bitd and beebasm now and never considered changing. I think i would still use beebasm even if I was tempted by another platform.
Last edited by tricky on Sun Jan 27, 2019 10:18 pm, edited 1 time in total.
Re: Which debugger do you use?
How does the n command in b-em work? The help says
But when it hit a BNE it didn't return until it hit a breakpoint, so it thinks that is a subroutine? I thought the only way to call a subroutine is JSR.
Code: Select all
n - step, but treat a called subroutine as one step
Re: Which debugger do you use?
The n command should set a breakpoint on the instruction after the current one, and run until that is hit.pau1ie wrote: ↑Mon Jan 28, 2019 8:36 pmHow does the n command in b-em work? The help says
But when it hit a BNE it didn't return until it hit a breakpoint, so it thinks that is a subroutine? I thought the only way to call a subroutine is JSR.Code: Select all
n - step, but treat a called subroutine as one step
It's useful to quickly skip over a subroutine call (if used on a JSR).
It can also be used to skip past a loop (if used on the backwards branch at the end of a loop).
Dave
Last edited by hoglet on Mon Jan 28, 2019 10:02 pm, edited 2 times in total.
-
- Posts: 1403
- Joined: Tue Apr 30, 2013 12:16 pm
- Contact:
Re: Which debugger do you use?
It's not free but I find it very good NoIce from John Hartmann. I bought the full version and find it excellent. If anyone wants a try I can help with porting a 6502 monitor (you need to write a small module to communicate with the remote PC).
For longer running / difficult to track down problems Dave's decode6502 and a fx2lafw can often find stuff quickly that would otherwise take a lot of tracking down....I really need to make a 6809 version!
D
For longer running / difficult to track down problems Dave's decode6502 and a fx2lafw can often find stuff quickly that would otherwise take a lot of tracking down....I really need to make a 6809 version!
D
Re: Which debugger do you use?
I'm trying to debug some assembly I've written using the BASIC assembler in beebem (4.14/4.15), but I don't even know how to display the contents of the registers (PC, A, X, Y, F). It seems that 'code' shows them once after a break but that's it. I'd really like to single step through a loop.
Could someone give me some pointers?
Or is there another (precompiled) emulator that would do the job, that I can paste BASIC code into?
(I'm leaning towards compiling the code for the VIC-20 and debugging in VICE... but that would be a shame).
Could someone give me some pointers?
Or is there another (precompiled) emulator that would do the job, that I can paste BASIC code into?
(I'm leaning towards compiling the code for the VIC-20 and debugging in VICE... but that would be a shame).
Re: Which debugger do you use?
type help in the box for a list of command.
Type n [return] to run the next instruction and return again for the next ...
You can also do n 99 to run the next 99 instructions - will list them in the text window along with the register valus.
Type n [return] to run the next instruction and return again for the next ...
You can also do n 99 to run the next 99 instructions - will list them in the text window along with the register valus.
Re: Which debugger do you use?
That didn't work when I tried it before, and it didn't work this time either.
I pressed 'break' to stop the 6502 (so it says 'cancel' on the button), then typed 'n' and hit enter. Nothing appeared in the output window. Nothing for 'next' or 'next 1' either. Typing code works, as do peek, watch, etc. I also tried 'n' then pressing 'execute command'. That didn't do anything either.
(BeebEm downloaded from http://www.mkw.me.uk/beebem/BeebEm415.exe)
[EDIT]
Ok, I see what I was doing wrong.
(1) needed to attach debugger to OS and ROM (in case it breaks in the OS code)
(2) needed to uncheck 'Options/Freeze when inactive'
Hopefully this will help someone else.
I pressed 'break' to stop the 6502 (so it says 'cancel' on the button), then typed 'n' and hit enter. Nothing appeared in the output window. Nothing for 'next' or 'next 1' either. Typing code works, as do peek, watch, etc. I also tried 'n' then pressing 'execute command'. That didn't do anything either.
(BeebEm downloaded from http://www.mkw.me.uk/beebem/BeebEm415.exe)
[EDIT]
Ok, I see what I was doing wrong.
(1) needed to attach debugger to OS and ROM (in case it breaks in the OS code)
(2) needed to uncheck 'Options/Freeze when inactive'
Hopefully this will help someone else.