Debugging on ZEsarUX by reading source code

Emulator and emulator development specific topics
Post Reply
User avatar
chernandezba
Posts: 156
Joined: Tue Mar 11, 2014 3:30 pm

Debugging on ZEsarUX by reading source code

Post by chernandezba » Mon Mar 13, 2017 6:51 pm

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
----

ZEsarUX
ZX Second-Emulator And Released for UniX
https://sourceforge.net/projects/zesarux/

User avatar
marste
Posts: 97
Joined: Sun Aug 10, 2014 8:58 pm
Location: Italy
Contact:

Re: Debugging on ZEsarUX by reading source code

Post by marste » Tue Mar 21, 2017 10:10 pm

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)
Attachments
fasmgutils.inc.txt
(1.82 KiB) Downloaded 11 times

User avatar
chernandezba
Posts: 156
Joined: Tue Mar 11, 2014 3:30 pm

Re: Debugging on ZEsarUX by reading source code

Post by chernandezba » Thu Mar 23, 2017 12:16 pm

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
----

ZEsarUX
ZX Second-Emulator And Released for UniX
https://sourceforge.net/projects/zesarux/

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest