Debugging on ZEsarUX by reading source code

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

Debugging on ZEsarUX by reading source code

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

ZEsarUX
ZX Second-Emulator And Released for UniX
https://github.com/chernandezba/zesarux
User avatar
marste
Posts: 250
Joined: Sun Aug 10, 2014 9:58 pm
Location: Italy
Contact:

Re: Debugging on ZEsarUX by reading source code

Post 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)
Attachments
fasmgutils.inc.txt
(1.82 KiB) Downloaded 275 times
User avatar
chernandezba
Posts: 205
Joined: Tue Mar 11, 2014 4:30 pm

Re: Debugging on ZEsarUX by reading source code

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

ZEsarUX
ZX Second-Emulator And Released for UniX
https://github.com/chernandezba/zesarux
Post Reply