ZX-Assembler version 0.8 (beta) released

Dear readers,

yesterday I've published ZX-Assembler in its first version 0.8.
It offers you some interesting features, even if I know there are
better and more powerful assembler tools around:

* Load and edit ASM files, following the syntax rules of SjASMPlus and SjASM
(but please take care about the differencies, if you want to edit sources
from SjASM directly)

* I gave you all example programs of the help file in an \examples folder
with the installation.

* Description of all Z80 mnemonics and pseudo instructions with examples
in the help file.

* Syntax helper in the bottom line (enter a command in the "commands" column,
then perform a mouse over and it shows more details about that command).

* File Dropbox: Load and save without using the hard disk. Good "sandbox"
for test files. With the ability to export to disk, import from disk,
delete and edit the file directly with byte editor.

* You either can edit ASM instructions, and compile them to get their bytes,
but you also can edit bytes in a sneak code editor (that can be used
decimal, hexadecimal or text-based) and disassemble them automatically
to Z80 instructions.

* Icons to separate a multi-instruction command line (commands separated by
colon here), and the inverse function to connect a selected area of
commands to a multi-instruction command line.

* Label list: Shows you all found labels of your code, as well as local labels
in macros and loops, following 95 % the rules of SjASM (sorry, not all could
be done, as SjASM is extremely powerful tool, hard to re-make its abilities).
The label list can be sorted by name or address or type. Labels found on CALL
or JUMP are listed with their type, also indication the jump positions in
the source editor to help you to find subroutines. Also, clicking on a label
jumps to the source position.

* Copy and paste icons which work on an ASM text base. Means that code, that
has been copied to clipboard with Ctrl+C is a pure ASM file (including labels
and comments) and can be inserted into another position of your source or
into a text editor to get a full usable ASM file again.

* File based instructions like INCBIN and EXECUTE to make it possible to
create an auto-executing SNA file containing your own code!

* Edit datablocks of ZX-Spectrum emulator files directly with ZX-Assembler.

* The other modules ZX-Paintbrush, ZX-Blockeditor and ZX-Editor are now
re-compiled to let them call ZX-Assembler in a dialog for editing data
blocks containing machine code.

* Error log window. If an error is found, you can click on the message and
jump to the position in the source easily.

* Display window. Use the commands DISPLAY, DISPLAY.CLEAR and ASSERT to
produce text messages in a display tool window.

* On short jumps, ZX-Assembler checks whether the jump to a label is possible
or not. In case of not, you are asked whether the short jump should be
replaced by a far jump, including DJNZ --> DEC B: JP ...

* A big summary of pre-defined functions, including IF and CASE. Also, using
floating point numbers is no problem. E.g. defining an array of bytes or
word containing SINE numbers (multiplicated with a factor) is no problem.

* Includes most of the SjASM and SjASMPlus instructions. The results may vary
sometimes, as ZX-Assembler is not a copy of SjASM or SjASMPlus, but has been
developed by testing results of these compilers to get best results.

* Source includes using the INCLUDE instructions with up to 20 levels deep.

* Predefined ROM label file, that is auto-included by default and contains
all these nice ROM labels you need to access ZX-Spectrum ROM routines.
Can be customized or replaced by another ASM file containing labels.


I'm not sure if I have announced all features of this very, very expensive
program. But I don't want to hide things that are not yet working:

* code parts and pages need to be implemented for better compatibility with
SjASM (a highly complex feature, hard to perform, that's why I put this
in to one of the next releases).

* IFUSED instruction which works pretty much like a linker. If a label is
not used, code parts can be omitted.

* Undo/Redo features.

* Easier method of creating an executable snapshot, and also for 128k mode.

* MACRO functions and recursive macros.

There are no problems, only solutions (K. Flynn)

Visit my ZX-Modules homepage with lot of free programs, also VU3D-Animator!
Or visit my music-related website if you're interested in synthesizer music.
Thanked by 2Bali R-Tape
«1

Comments

  • edited July 2015
    Hi @clausjahn

    I downloaded via ZX Modules Updater with no problems.

    Nice work, looks good.

    zx%20assembler%200.8%20Screen%20Shot%202015-07-15%20at%202.34.30%20pm.png

    The only comments I have so far is that the toolbars (e.g. Found Labels, Error Messages) do not persist after quit and re-launch of app.

    I need to have a bit more of a play with the dropbox functionality and the OUTPUT and EXECUTE commands but
    as a new user it is a bit confusing initially when you assemble your source file and no output .bin or .lis file is produced so maybe it could be default behaviour or a setting in options to produce these files if no OUTPUT command is in operation.

    Regards,
    Derek.
    Post edited by dbolli on
    1985: ZX Spectrum+ 48K Interface 1 ZX81 16KB ASZMIC/SP ROM Philips 12" B/W TV Epson Dot Matrix Printer ZX Printer Now: Late 2015 iMac 5K 27" 4GHz i7 32GB RAM macOS 10.15.7 1TB Ext SSD USB C Drive Ext 4TB 3TB and 2TB USB 3 Hard Disks Ext USB 3 Blu-Ray iPad R7 32GB iPhone 6s 64GB iOS 14.0.1 Apple TV Gen 2
  • Where I can get it?
    Heavy on the disasm
  • dbolli wrote: »
    Hi @clausjahn

    I downloaded via ZX Modules Updater with no problems.

    Nice work, looks good.

    zx%20assembler%200.8%20Screen%20Shot%202015-07-15%20at%202.34.30%20pm.png

    The only comments I have so far is that the toolbars (e.g. Found Labels, Error Messages) do not persist after quit and re-launch of app.

    I need to have a bit more of a play with the dropbox functionality and the OUTPUT and EXECUTE commands but
    as a new user it is a bit confusing initially when you assemble your source file and no output .bin or .lis file is produced so maybe it could be default behaviour or a setting in options to produce these files if no OUTPUT command is in operation.

    Regards,
    Derek.

    It would be really, really no problem to add a switch in the options Dialog, with which the user can adjust whether the 4 special tool windows will be restored after reloading the program, or not. Aaahhh! :-) The first entry on my to-do-list.
    About a default output file, we could do the same: Add a Setting where you can define a default output file. But I would prefer to only let the program build this file (e.g. OUTPUT.BIN or DEFAULT.BIN) into the file dropbox rather than directly on disk.

    There are no problems, only solutions (K. Flynn)

    Visit my ZX-Modules homepage with lot of free programs, also VU3D-Animator!
    Or visit my music-related website if you're interested in synthesizer music.
  • Bedazzle wrote: »
    Where I can get it?
    exact my question

    Hi Claus, you used to have a sign below with your site, and since WOS has no updates since 1 and half year it would be nice if you could re-sign your sign with the download location
    Further i want to say that the png above reveals a TS list which is very nice .
    I hope i will get it to work under Wine and/orWineQT since i dont use windows anymore


    my old website http://home.hccnet.nl/c.born/ has changed to http://www.cborn.nl/zxfiles/ so just click it and select a file
  • Crisis wrote: »
    Bedazzle wrote: »
    Where I can get it?
    exact my question

    Hi Claus, you used to have a sign below with your site, and since WOS has no updates since 1 and half year it would be nice if you could re-sign your sign with the download location
    Further i want to say that the png above reveals a TS list which is very nice .
    I hope i will get it to work under Wine and/orWineQT since i dont use windows anymore

    Okay, I edited my signature - I completely did not recognize that it has gone... :-)
    Oh yeah. I forgot to mention the TS behaviour in the help file, too. But as this feature would be much more useful on a debugger running inside an emulator, it's for less use here. It's because of the time states differ on different conditions, jumps etc.
    ZX-Assembler should work under Wine, but I have to check this (I have a Linux installation with a working Wine, too).

    There are no problems, only solutions (K. Flynn)

    Visit my ZX-Modules homepage with lot of free programs, also VU3D-Animator!
    Or visit my music-related website if you're interested in synthesizer music.
  • edited July 2015
    Thanks Claus
    I willl try to in both wine-forks

    currently i am downloading and installing in 1 go since appearently wine has an 'wine-msi-installer' available
    Post edited by Crisis on
    my old website http://home.hccnet.nl/c.born/ has changed to http://www.cborn.nl/zxfiles/ so just click it and select a file
  • Thanks Claus, I've been looking forward to this as it might encourage me to learn and use more assembler commands.

    I'm struggling to make a file I can test in an emulator. Could I get a quick idiot's guide on the best and quickest way to do this, bearing in mind it will need to be repeated a lot while coding.
  • R-Tape wrote: »
    Thanks Claus, I've been looking forward to this as it might encourage me to learn and use more assembler commands.

    I'm struggling to make a file I can test in an emulator. Could I get a quick idiot's guide on the best and quickest way to do this, bearing in mind it will need to be repeated a lot while coding.

    Please read the help text (press F1) and read under "first steps" the section: "create a snapshot ...". Later I should make this easier, now it's a bit coding for the user. Also, please check the many examples on each instruction.

    There are no problems, only solutions (K. Flynn)

    Visit my ZX-Modules homepage with lot of free programs, also VU3D-Animator!
    Or visit my music-related website if you're interested in synthesizer music.
  • What you mean I have to actually read the instructions?!!!

    Sorry I missed that, will try later.
  • R-Tape wrote: »
    What you mean I have to actually read the instructions?!!!

    Sorry I missed that, will try later.

    Is the F1 key calling the help file not working on your system?

    There are no problems, only solutions (K. Flynn)

    Visit my ZX-Modules homepage with lot of free programs, also VU3D-Animator!
    Or visit my music-related website if you're interested in synthesizer music.
  • It is probably working, I was kidding.
  • dbolli wrote: »
    Hi @clausjahn

    The only comments I have so far is that the toolbars (e.g. Found Labels, Error Messages) do not persist after quit and re-launch of app.

    I need to have a bit more of a play with the dropbox functionality and the OUTPUT and EXECUTE commands but
    as a new user it is a bit confusing initially when you assemble your source file and no output .bin or .lis file is produced so maybe it could be default behaviour or a setting in options to produce these files if no OUTPUT command is in operation.

    Regards,
    Derek.

    Hi Derek,

    your suggestions will be available in the next release. Here's a preview:

    zxassembler35.jpg

    There are no problems, only solutions (K. Flynn)

    Visit my ZX-Modules homepage with lot of free programs, also VU3D-Animator!
    Or visit my music-related website if you're interested in synthesizer music.
    Thanked by 1dbolli
  • As the creation of a SNA snapshot containing your code works so famous, I see no prob. to enhance some more features:

    What about a DF (or DEFF, or FLOAT) instruction that creates these nice 5-byte floating point numbers you know from ZX-Spectrum?

    And what about creating a TAP file directly by coding? And putting your code into a byte block and after creation run it in your fav. emulator with the EXECUTE instruction?

    Would be nice to have a ZX-Assembler pseudo opcode which produces a ZX-Basic line, with these CHR$ 14 number codes, e.g. like this:

    DEFBAS '10 PRINT "hello, I am ";15'
    DEFBAS '20 LOAD "my code" CODE'

    which would generate the corresponding bytes, with that coded BASIC line number and the closing Enter...

    Nice ideas?

    There are no problems, only solutions (K. Flynn)

    Visit my ZX-Modules homepage with lot of free programs, also VU3D-Animator!
    Or visit my music-related website if you're interested in synthesizer music.
  • edited July 2015
    The F1 key doesn't bring up help for me, it automatically raises the general help. I just can't work out how to do it. I think it should be more intuitive to create a Spectrum usable file - something under the 'Assemble' option maybe.

    Direct creation of a TAP file sounds good to me, it would cut out the middle man when finally putting a project together.

    The ZXBasic line idea would not be of use to me, but I imagine compiler users would like this.
    Post edited by R-Tape on
  • R-Tape wrote: »
    The F1 key doesn't bring up help for me, it automatically raises the general help. I just can't work out how to do it. I think it should be more intuitive to create a Spectrum usable file - something under the 'Assemble' option maybe.

    Direct creation of a TAP file sounds good to me, it would cut out the middle man when finally putting a project together.

    The ZXBasic line idea would not be of use to me, but I imagine compiler users would like this.

    The F1 key opens the general help file, but getting this you should have a chapter tree on the left side containing the full instructions, first steps and all that...

    There are no problems, only solutions (K. Flynn)

    Visit my ZX-Modules homepage with lot of free programs, also VU3D-Animator!
    Or visit my music-related website if you're interested in synthesizer music.
  • edited July 2015
    No I mean the Windows help opens, not the ZX-Assembler help. I've tried Shift&F1 but that doesn't do anything.
    Post edited by R-Tape on
  • Thanks for it Claus.

    Currently I'm having tough time at work and when I return home I'm too tired to do some serious Speccy coding but I'll certainly try it out later.
  • edited July 2015
    I tried that and did not liked editor. Imo should be separate editor, as I like to use Notepad++ for example and it have much better edit options.
    Post edited by Shadow Maker on
  • Ralf wrote: »
    Thanks for it Claus.

    Currently I'm having tough time at work and when I return home I'm too tired to do some serious Speccy coding but I'll certainly try it out later.

    Hey Ralf, there's no need for a hurry. but thanks for testing.
    I tried that and did not liked editor. Imo should be separate editor, as I like to use Notepad++ for example and it have much better edit options.

    I'm not surprised about your opinion, believe me, but thanks for testing, though.
    People who are about to be interested in the stuff I'm doing, should check the screenshots of my programs available on my homepage. Usually, people see in the first stages, that "this program has no use for me". I know that there are better assemblers around....

    There are no problems, only solutions (K. Flynn)

    Visit my ZX-Modules homepage with lot of free programs, also VU3D-Animator!
    Or visit my music-related website if you're interested in synthesizer music.
  • I saw screenshots, but I wanted to give it a go, to see if it is comfortable to edit the text and stuff... Well, it is not, sorry. And as programmer use the copy-paste-mass-replace-etc. functions a lot in Spectrum coding, this is really essential part, so you should spend more time increasing editor functionality, by me... You can take Sublime Text and Notepad++ as milestones, but that's all up to you...
  • edited July 2015
    This looks very promising. good work!

    There are a few problems I noticed that you are probably already planning to fix, but I will mention them anyway:

    1.) When opening a binary file, it should ask you for the initial address, instead of importing at address zero.

    2.) Option "Inserts code from a binary or assembler file" should insert code at cursor position, instead of inserting at top of editing area.

    3.) Current option to display all addresses and values in decimal or hexa, should also be applied when importing a binary file. Also there should be another option to switch hexa format between 0ah and $0a.

    4.) Predefined ROM labels is a nice feature, but when you save your file as ASM, it must include all used ROM label definitions, otherwise the generated ASM won't work on any assembler except yours.
    Post edited by Einar Saukas on
    Creator of ZXDB, BIFROST/NIRVANA, ZX7/RCS, etc. I don't frequent this forum anymore, please look for me elsewhere.
  • edited July 2015
    Also this is how I would expect ZX-Assembler to work (I hope you will find these ideas useful):

    1.) When user imports a certain binary file (27 bytes long in this example) to address 40000, it should give a result like this:

    294rjty.png

    2.) Now user imports a memory execution map from an emulator, indicating addresses 40000 to 40008 were executed (so it's code!), 40012 to 40022 were read (so it's data!), There's no information about the rest. Whenever there's no information about a certain memory area, it should simply assume the same type (instruction or data) from last known address until indicated otherwise, so it should now give this result:

    1604zte.png
    (Notice how address 40012 was automatically identified as reference inside a data block and thus renamed to label L9C4C)

    3.) Afterwards user should have the option to indicate that area 40009 to 40026 must be interpreted as string, then it will give this result:

    25syfkp.png
    (Notice how string is automatically split at address 40012 due to a define label at this address)

    4.) Now renaming label L9C4C to something like msgHello should also automatically rename all references to this label, like this:

    2mg2onk.png

    5.) Finally, defining new labels msgHi and msgBye in the middle of a string block should automatically split it further:

    2sb6afm.png

    Makes sense?
    Post edited by Einar Saukas on
    Creator of ZXDB, BIFROST/NIRVANA, ZX7/RCS, etc. I don't frequent this forum anymore, please look for me elsewhere.
  • Also this is how I would expect ZX-Assembler to work (I hope you will find these ideas useful):

    1.) When user imports a certain binary file (27 bytes long in this example) to address 40000, it should give a result like this:

    294rjty.png

    2.) Now user imports a memory execution map from an emulator, indicating addresses 40000 to 40008 were executed (so it's code!), 40012 to 40022 were read (so it's data!), There's no information about the rest. Whenever there's no information about a certain memory area, it should simply assume the same type (instruction or data) from last known address until indicated otherwise, so it should now give this result:

    1604zte.png
    (Notice how address 40012 was automatically identified as reference inside a data block and thus renamed to label L9C4C)

    3.) Afterwards user should have the option to indicate that area 40009 to 40026 must be interpreted as string, then it will give this result:

    25syfkp.png
    (Notice how string is automatically split at address 40012 due to a define label at this address)

    4.) Now renaming label L9C4C to something like msgHello should also automatically rename all references to this label, like this:

    2mg2onk.png

    5.) Finally, defining new labels msgHi and msgBye in the middle of a string block should automatically split it further:

    2sb6afm.png

    Makes sense?

    All your suggestion seem to be useful, even if I know that these data area handling is an important missing part at the moment. When I'm back from Rome, Italy I will consider all your suggestions. Especially those settings for start address, hexa format are easy to implement and are very good ideas.

    Because I knew that many important things are missing, I decided to set version to 0.8.

    And about your question: Yes, all makes sense! Thank you!

    There are no problems, only solutions (K. Flynn)

    Visit my ZX-Modules homepage with lot of free programs, also VU3D-Animator!
    Or visit my music-related website if you're interested in synthesizer music.
  • Regarding memory execution maps, Skoolkit documentation says:
    The -M option may be used (in conjunction with the -g option) to specify a code execution map to use when generating a control file. The supported file formats are:

    Profiles created by the Fuse emulator
    Code execution logs created by the SpecEmu, Spud and Zero emulators
    Map files created by the Z80 emulator
    If the file specified by the -M option is 8192 bytes long, it is assumed to be a Z80 map file; otherwise it is assumed to be in one of the other supported formats.

    The memory execution map format for Gerton Lunter's Z80 emulator is described in its TECHINFO.DOC under section "File formats" as "Map files". I don't know about the others.
    Creator of ZXDB, BIFROST/NIRVANA, ZX7/RCS, etc. I don't frequent this forum anymore, please look for me elsewhere.

  • Thank you! The links help a lot to understand how to find data sections on snapshot images, especially the iteration beginning with the PC pointer sounds very interesting to me. It's much more complicated to find a good entry point on a partial block (e.g. a block of a tape file) because there is no PC pointer where to start iteration.

    But loading a map file could help here I don't know for sure now.

    There are no problems, only solutions (K. Flynn)

    Visit my ZX-Modules homepage with lot of free programs, also VU3D-Animator!
    Or visit my music-related website if you're interested in synthesizer music.

  • 1.) When opening a binary file, it should ask you for the initial address, instead of importing at address zero.

    yes that's true and important so this will be added.
    2.) Option "Inserts code from a binary or assembler file" should insert code at cursor position, instead of inserting at top of editing area.

    This should work this way (was intended so) but I will check this
    3.) Current option to display all addresses and values in decimal or hexa, should also be applied when importing a binary file. Also there should be another option to switch hexa format between 0ah and $0a.

    The addresses should be used in the numeric format that is currently set. But maybe this has to be checked again....
    The numeric format and hexadecimal spelling should be an option in the dialog that asks for the start address.
    4.) Predefined ROM labels is a nice feature, but when you save your file as ASM, it must include all used ROM label definitions, otherwise the generated ASM won't work on any assembler except yours.

    Yes that's also true. Thanks!!!

    There are no problems, only solutions (K. Flynn)

    Visit my ZX-Modules homepage with lot of free programs, also VU3D-Animator!
    Or visit my music-related website if you're interested in synthesizer music.
  • edited July 2015
    I will add a support feature for execution maps with import and export feature and an editor where you can define data and string areas and save also into a text based file for easy editing.
    Post edited by clausjahn on

    There are no problems, only solutions (K. Flynn)

    Visit my ZX-Modules homepage with lot of free programs, also VU3D-Animator!
    Or visit my music-related website if you're interested in synthesizer music.
  • Great!

    Another useful link:

    http://skoolkit.ca/?p=780
    Creator of ZXDB, BIFROST/NIRVANA, ZX7/RCS, etc. I don't frequent this forum anymore, please look for me elsewhere.
  • Also this is how I would expect ZX-Assembler to work (I hope you will find these ideas useful):

    1.) When user imports a certain binary file (27 bytes long in this example) to address 40000, it should give a result like this:

    294rjty.png

    2.) Now user imports a memory execution map from an emulator, indicating addresses 40000 to 40008 were executed (so it's code!), 40012 to 40022 were read (so it's data!), There's no information about the rest. Whenever there's no information about a certain memory area, it should simply assume the same type (instruction or data) from last known address until indicated otherwise, so it should now give this result:

    1604zte.png
    (Notice how address 40012 was automatically identified as reference inside a data block and thus renamed to label L9C4C)

    3.) Afterwards user should have the option to indicate that area 40009 to 40026 must be interpreted as string, then it will give this result:

    25syfkp.png
    (Notice how string is automatically split at address 40012 due to a define label at this address)

    4.) Now renaming label L9C4C to something like msgHello should also automatically rename all references to this label, like this:

    2mg2onk.png

    5.) Finally, defining new labels msgHi and msgBye in the middle of a string block should automatically split it further:

    2sb6afm.png

    Makes sense?

    Wonderful example. I have downloaded this into my smartphone since I was in Rome last week. The way of converting code into data or string sections is that I would fully agree. Also generating auto-labels for converted sections is a good idea. If the separation occurs within a Z80 instruction (as the ld hl,NN in your example), the whole instruction should be seen as data, too.

    I see some problems to be solved, e.g. the replacing of existing labels would need some more intelligence, as labels are inside expressions (finally a label itself without operators is an expression as well) have to be identified during editing. I will try to solve this. :-)
    I would say, renaming auto-generated labels would be one of the most useful features in ZX-Assembler!

    Thanks so much! :o)

    There are no problems, only solutions (K. Flynn)

    Visit my ZX-Modules homepage with lot of free programs, also VU3D-Animator!
    Or visit my music-related website if you're interested in synthesizer music.
Sign In or Register to comment.