This is just a first version, but it would be interesting to hear what you think of my effort to integrate the Pasmo assembler into my emulator, and if you have any suggestions for improvements. The way it works is that you select an .asm file and let the emulator invoke the assembler, which saves the resulting code to a file, which the emulator then loads into RAM behind the scenes.
If you want to give it a try, the emulator can be downloaded from the link in my signature. The assembler is not included in the download, but it can be found here: http://pasmo.speccy.org/. Once you have installed the assembler, start the emulator and open the assembler window under the tools menu. There, you need to tell the emulator where you have installed Pasmo.exe (default is c:\tools\pasmo\). Then you can choose a source file, set a target memory location, assemble and load the machine code.
Emulator integrated with Pasmo assembler
Emulator integrated with Pasmo assembler
My ZX Spectrum emulator project: https://softspectrum48.weebly.com.
Re: Emulator integrated with Pasmo assembler
I't seems promising but does it give any serious advantage?
When you do it standard way you:
- open .asm file in text editor
- press shortcut to compile it
- click on compiled file to open it in emulator
It may seem more work but if you have you project opened, compiling and opening your snapshot lasts maybe 2 seconds![Wink ;)](./images/smilies/icon_e_wink.gif)
It would be great if you were able to import labels and comments from .asm file to debugger. Did you considered that?
When you do it standard way you:
- open .asm file in text editor
- press shortcut to compile it
- click on compiled file to open it in emulator
It may seem more work but if you have you project opened, compiling and opening your snapshot lasts maybe 2 seconds
![Wink ;)](./images/smilies/icon_e_wink.gif)
It would be great if you were able to import labels and comments from .asm file to debugger. Did you considered that?
Re: Emulator integrated with Pasmo assembler
Thank you for the feedback [mention]Ralf[/mention]. You have a good point about the possible advantages with this solution. Maybe this just reveals the fact that I'm not an assembly programmer myself
and that I haven't investigated how to set up an efficient workflow the way you describe it.
That said, I hope to add functions to improve the workflow, and will definitely look into your suggestion about importing labels to the debugger (importing comments would be great, but more difficult).
![Embarrassed :oops:](./images/smilies/icon_redface.gif)
That said, I hope to add functions to improve the workflow, and will definitely look into your suggestion about importing labels to the debugger (importing comments would be great, but more difficult).
My ZX Spectrum emulator project: https://softspectrum48.weebly.com.
Re: Emulator integrated with Pasmo assembler
I made a little experiment and let the emulator load the symbol table which Pasmo generates into the debugger, like this:
![Image](https://s22.postimg.cc/fxjpwgv19/Symbols.png)
The symbols are stored in an array in parallel with the memory array. It would be nice to pre-load the labels from a ROM disassembly as well.
![Image](https://s22.postimg.cc/fxjpwgv19/Symbols.png)
The symbols are stored in an array in parallel with the memory array. It would be nice to pre-load the labels from a ROM disassembly as well.
My ZX Spectrum emulator project: https://softspectrum48.weebly.com.
- lister_of_smeg
- Microbot
- Posts: 145
- Joined: Thu Nov 16, 2017 1:44 pm
Re: Emulator integrated with Pasmo assembler
Very nice!
Even better would be if you could set execution breakpoints in the emulator using comments in the asm source.
For example, something like:-
...and the emulator would set a breakpoint at the relevant address.
Even better would be if you could set execution breakpoints in the emulator using comments in the asm source.
For example, something like:-
Code: Select all
...
loop: dec e ;!br
call nz, routine
jr loop
...
Re: Emulator integrated with Pasmo assembler
Thank you
![Smile :)](./images/smilies/icon_e_smile.gif)
I think it would be difficult to set breakpoints using comments in the source as long as I let Pasmo handle the assembly; the emulator never sees the source, and there is no way that I know to connect a comment in the source to the binary code. What I could do is to treat labels with a certain character or string as breakpoints. I'll look into that. Thank you for the suggestion!lister_of_smeg wrote: ↑Sat Jun 09, 2018 11:05 pm Even better would be if you could set execution breakpoints in the emulator using comments in the asm source.
My ZX Spectrum emulator project: https://softspectrum48.weebly.com.
Re: Emulator integrated with Pasmo assembler
Breakpoints are now created automatically from labels named 'BR1', 'BR2' or 'BR3' (there are only three breakpoints in the debugger). After loading a source file with breakpoint labels, the user has to activate them in the debug window - (I may add an activation button in the assembler window later).
Other improvements to the assembler functions are:
Other improvements to the assembler functions are:
- A "Run" button to run the assembled code.
- Preloaded labels from Geoff Wearmouth's ROM disassembly for the 48K ROM (not really an assembler function actually). If and when I find labels for other ROM:s I'll add them as well.
My ZX Spectrum emulator project: https://softspectrum48.weebly.com.