Page 1 of 1

Debugging on ZEsarUX by reading source code

Posted: Mon Mar 13, 2017 7:51 pm
by chernandezba
HI

New feature for ZEsarUX:

https://youtu.be/z-TipWv0n9g

With that you can associate an assembler source code to a program in memory so it will debug it showing the source code. The trick works by finding labels on the source code with format LXXXX where XXXX is the memory address. This is helping me to debug the QL rom because the source code has labels in this format

And that's all (by now ;) )

Cheers
Cesar

Re: Debugging on ZEsarUX by reading source code

Posted: Tue Mar 21, 2017 11:10 pm
by marste
Dear Cesar this is a very nice feature!

I've recently setup a cross-platform toolchain for zx81 development with the use of "fasmg" plus "ez80 includes" (I'm mostly using Linux, and windows just for debugging with EightyOne and No$Zx, very good both but unfortunately platform dependent).

Since what I've seen here, I modified with Tomasz Grysztar help the utility I use for listing the code, and now on each line together with the address there are also the source filename and the source line number, as in this example:

Code: Select all

00000000 (pippo.asm,1):  00                      nop
00000001 (pippo.asm,2):  C3 0C 00                jp test
00000004 (pippo.asm,4):  00                      nop
00000005 (pippo.asm,5):  18 05                   jr test
00000007 (test.inc,1):   00                      nop
00000008 (test.inc,2):   3A 0C 00                ld a,(test)
0000000B (pippo.asm,8):  00                      nop
0000000C (pippo.asm,9):  00                      test: nop
0000000D (pippo.asm,10): 00                      nop 
will this be good for viewing source in debugging?

Note that in this way the file can be automatically loaded from current directory without inserting the name by hand.

Attached the include for listing utility. Fasmg and the ez80 include can be downloaded from internet (or I can attach here if needed)

Re: Debugging on ZEsarUX by reading source code

Posted: Thu Mar 23, 2017 1:16 pm
by chernandezba
Hi

Your idea is even better! :) I will add to my TODO list.

Maybe I can make some kind of script that read your file and generates only one output file with the source code lines, useful to read on ZEsarUX

Thanks
Cesar