ZX-Modules app report

edited August 2014 in Emulators
ZX-Modules app report

If You are interested, I want to report about the state and progress about my ZX-Modules programs. I would like to report at least monthly here in this thread. Is this okay for you?

Comments are always welcome!

April 26th, 2014:
ZX-Central 0.9 published

This program is thought for Windows based programs on your computer. Especially for the ZX-Modules but also for Emulators and utilities. In another thread, some of you gave interesting comments about what to be expected about that program. If your hopes about ZX-Central did not become reality, do not forget: I take much lifetime for updates and enhancements. And I just have some ideas for ZX-Central as well.
But it had to be published as I was working on it since 2010!

April 18th, 2014:
ZX-Paintbrush 2.4.0.1 published

Since the 2.4 update came with interesting news like Ctrl and Shifted mouse movement fixes X or Y axis, and the longer expected 8x2 and 8x4 attribute formats (available for ZXP pictures), there was once again a nasty German language bug, that could be fixed here.

What about...?

--> ZX-Editor?

Only a few days left for the next update.
As ZX-Paintbrush, also ZX-Editor and ZX-Blockeditor need another update to work with ZX-Central properly. Besides, I'm just solving a problem with the character display (not only for better speed performance, but also for appearance). Especially on most fonts, there are overlappings at the left and right side of a character. In italic mode, characters are cut off, too.
Also, a bug with the zoom level has also be solved already. Fonts control codes were not zoomed correctly.

--> ZX-Assembler & ZX-Preview

After a long period it makes fun to work on ZX-Assembler again. I know that this flexible tool is expected most. Be patient for a while.
ZX-Preview uses parts of the disassembler that has been developed for ZX-Assembler. Here are also some corrections needed.

I will give my best to make a beta for ZX-Assembler soon.
Post edited by clausjahn on

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

Visit my ZX-Modules homepage with lot of free programs!
Or visit my music-related website if you're interested in synthesizer music or computer animations and movies I've created
«1

Comments

  • edited April 2014
    Nice work claus.

    I always look forward to an update of your modules.
  • LCDLCD
    edited April 2014
    Downloading now... Thank you Claus.
  • edited April 2014
    ASH-II wrote: »
    Nice work claus.

    I always look forward to an update of your modules.

    Thanks! :-)
    LCD wrote: »
    Downloading now... Thank you Claus.

    Once again, thanks! :-)

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

    Visit my ZX-Modules homepage with lot of free programs!
    Or visit my music-related website if you're interested in synthesizer music or computer animations and movies I've created
  • edited May 2014
    Dear friends!

    Today I have released a new version of ZX-Modules Updater, mainly because I had to change my internet domain - instead of www.zxmodules.de it's now www.zx-modules.de (indeed it's a completely different internet provider).

    But I also changed some symbols for the lovely small projects FZX-Editor, IZX-Editor and Image2ULAPlus. :-)

    The new version loads the files from the new internet address. But for all users who forget to update the ZX-Modules Updater, I will still continue uploading the files on the old domain, too. But only until autumn, as then the old webspace will be closed.

    I also updated the 'applicationrules.def' file of ZX-Central according to my new internet domain. So, simply use the 'Update' button and you'll get the updated internet addresses. :-)

    Puh, a hard job.... :-)

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

    Visit my ZX-Modules homepage with lot of free programs!
    Or visit my music-related website if you're interested in synthesizer music or computer animations and movies I've created
  • edited May 2014
    Dear friends,

    as the last update of ZX-Editor was more than one year ago, I released a new version today: version 2.3.

    To let you - the user or ZX-Spectrum BASIC (or Beta Basic?) programmer - give you a high performance program, I have optimized some things.

    The changes are listed here:
    • G?nter Br?tting suggested a better usage of the % sign that is used by ZX-Editor to indicate a variable that looks like a keyword:
      There are Basic extensions where the % is used to indicate other BIOSes commands. In the previous version, all inserted % characters were removed before saving. So I changed the saving routine so that it does not remove the % sign if no variable follows that looks like a Spectrum keyword.
    • Bugfixes around the file structure list (block list) window: Refer to the "common changes" section.
    • Bugfix: The zoom factor function did not zoom fonts, that were introduced by the font style control code with a given height. Now, all is zoomed properly.
    • Enhanced the display of italic fonts and fonts that have overlapping areas in their characters: In Windows mode, all characters are displayed correctly now. Only when selecting text, the old char by char display is temporary active for two rows only. In Basic token mode (48k, 128k, BetaBasic 3 and 4), the correct italic letters are enabled for groups of characters and groups of numbers.
    • Important changes for ZX-Editor called and bound by ZX-Central.
    • You can now define two different standard fonts now: One for text editing, and one for Basic editing.
    • In Windows mode, you now can adjust the blinking text cursor either to Windows style and to ZX-Spectrum (48k) mode. See the options dialog.
    • There are two more edit functions: For inserted colored or transparent 8x8 pixel blocks you can edit them easily, simply by placing the cursor after such a block and calling the menu function.
    • The extension-to-application association (in options dialog) now shows a command line example for the selected file type. Important for the "run file" function.

    I hope, some more of you find this program useful for editing Basic programs in TAP or TZX files. Please take a look inside the
    variables detection window that helps a lot for Basic programming.

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

    Visit my ZX-Modules homepage with lot of free programs!
    Or visit my music-related website if you're interested in synthesizer music or computer animations and movies I've created
  • edited May 2014
    Hi Claus

    could I add some suggestions :)

    ZX Editor:
    1. could the lines be re-listed or a button - to sort the listing in line number order (when entering lines of code)
    2. start the program in 'K' mode (not forced L mode) it's off putting when nothing seems to work until you press the 'L' icon
    3.is there any way to add a display window (like Basin's) so the programs can be tested. (maybe a third party emu)

    ZX Updater:
    could you add a minimize button instead of the prompt when I press close
    even if I go to FILE:Exit it asks me if I want to exit or minimize (and minimize is the default) so it's another two buttons to exit

    if not then just remove the niggling exit prompt.....PLEASE.... :)

    good work as always.
  • edited May 2014
    As mentioned in another thread, I've done a Mac application wrapper for ZX-Modules Central:

    https://dl.dropboxusercontent.com/u/15659782/MacZXMC.zip

    One feature request for ZXMC ... it would be nice if it could install the apps as well (even if it's just the ZX-Modules apps, as per the ZX-Modules Updater). Currently to add new apps you have to do this:

    1. Right-click MacZXMC and select Show Package Contents.
    2. Double-click the Wineskin app in the MacZXMC folder.
    3. Click Install Software.
    4. When you're done click Quit.
    5. Relaunch MacZXMC.

    But the update feature is great. As a side note though, ZXMU doesn't recognize the latest version of Image2ULAplus.
  • edited May 2014
    Dear friends,

    of course, suggestions are always welcome. :-) I will keep my work on ZX-Assembler, what means that I need a delay on the other projects (but small changes on ZXMU are really no problem and can be implemented much easier than in the 'dinosaur' projects...)
    ASH-II wrote: »
    Hi Claus

    could I add some suggestions :)

    ZX Editor:
    1. could the lines be re-listed or a button - to sort the listing in line number order (when entering lines of code)
    2. start the program in 'K' mode (not forced L mode) it's off putting when nothing seems to work until you press the 'L' icon
    3.is there any way to add a display window (like Basin's) so the programs can be tested. (maybe a third party emu)

    1. I also see the need of a renumber feature. Defenitely placed on the next-to-do-list.

    2. Your wish should be permanently solved by disabling the 'force letter mode' option and creating a new TZX or TAP file directly after program start.

    If you are editing a text-based file (TXT or ZXE) and do not use any of the 4 token mode buttons (48k, 128k, BB3 and BB4), you have a L-cursor or a vertical line (depending on the options). The L mode is here a logical decision, because no token mode means, no keyword is wanted.

    If you are editing a real Basic program, the K-mode will be active (if 'force L-mode' option is not active). In this situation you are (nearly) in the same situation as in the Speccy's Basic editor.

    Probably you are meaning that I should make a default TAP or TZX file available at start instead of an empty ZXE file?

    3. Yep. It's already available. There is the 'run file' option. Let me describe it with some screenshots, how to use an external emulator for testing your written BASIC programs.

    3.1. Overriding TZX files to open with Fuse.

    If no TZX file entry is already defined, add a new line in the Extension-to-Application-List of the options dialog. For Fuse, the settings should be as follows (file parameter need double-quotes):

    zxeditor01.jpg

    Refer to the example command line. This will work. From now, TZX files are not started with their Windows associated application, but with Fuse instead.

    3.2. Create a new Beta Basic program:

    Select File - New and select 'complex tape files':

    zxeditor02.jpg

    I decided to use a Beta Basic 4.0 loader. ZX-Editor loads the loader (= the second Basic block) into the editor:

    zxeditor03.jpg

    I now remove the placeholder REM line and replace it by a simple Beta Basic program. Before I can do this, I should enable the BB4 token mode, when using the token mode:

    zxeditor04.jpg

    Of course, I can use the virtual keyboard that helps entering the Basic tokens:

    zxeditor05.jpg

    Graphics mode enables the special Beta Basic 4 tokens:

    zxeditor06.jpg

    After a minute, we have a small demo program:

    zxeditor07.jpg


    3.3. Starting the file

    Before a file can be started, it must be saved to disk. I saved the file as 'demo.tzx'.

    After this, the "run file" function can be performed.

    zxeditor08.jpg

    And Fuse does its job (think about enabling 128k mode for this example):

    zxeditor09.jpg
    ZX Updater:
    could you add a minimize button instead of the prompt when I press close
    even if I go to FILE:Exit it asks me if I want to exit or minimize (and minimize is the default) so it's another two buttons to exit

    if not then just remove the niggling exit prompt.....PLEASE.... :)

    good work as always.

    Okay, I will try to re-define the minimize icon (the standard minimize is different to the other minimizing to systray what I use). Okay, the dialog may be annoying if it has to be used more that 3 times per day.. ;-)
    aowen wrote: »
    As mentioned in another thread, I've done a Mac application wrapper for ZX-Modules Central:

    https://dl.dropboxusercontent.com/u/15659782/MacZXMC.zip

    One feature request for ZXMC ... it would be nice if it could install the apps as well (even if it's just the ZX-Modules apps, as per the ZX-Modules Updater). Currently to add new apps you have to do this:

    1. Right-click MacZXMC and select Show Package Contents.
    2. Double-click the Wineskin app in the MacZXMC folder.
    3. Click Install Software.
    4. When you're done click Quit.
    5. Relaunch MacZXMC.

    But the update feature is great. As a side note though, ZXMU doesn't recognize the latest version
    of Image2ULAplus.

    A direct installation from ZX-Modules updater is not available. As for bestmost compatibility, I once decided to use Installshield express instead of a self-made installer. It probably could be resolved if I only use ZIP archives instead of MSI or EXE setups. Then, ZX-Modules Updater could perform the storage
    of the files on the PC, but we would lose the uninstall feature. I think I have no quick solution for this, but even though I am very pleased by your effort in making the wrapper...

    What do you think about using ZIP archives instead of MSI/EXE installer?

    About Image2ULAPlus: On my PC, ZX-Modules updater recognizes Image2ULAPlus 1.3 perfectly. I have no idea what's going wrong there...

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

    Visit my ZX-Modules homepage with lot of free programs!
    Or visit my music-related website if you're interested in synthesizer music or computer animations and movies I've created
  • edited May 2014
    clausjahn wrote: »
    A direct installation from ZX-Modules updater is not available. As for bestmost compatibility, I once decided to use Installshield express instead of a self-made installer. It probably could be resolved if I only use ZIP archives instead of MSI or EXE setups. Then, ZX-Modules Updater could perform the storage
    of the files on the PC, but we would lose the uninstall feature. I think I have no quick solution for this, but even though I am very pleased by your effort in making the wrapper...

    What do you think about using ZIP archives instead of MSI/EXE installer?

    Unless switching to ZIP would enable the apps to be installed from within ZXMC (instead of by running the Wineskin installer) then I don't see any advantage over MSI.
    About Image2ULAPlus: On my PC, ZX-Modules updater recognizes Image2ULAPlus 1.3 perfectly. I have no idea what's going wrong there...

    Probably just something to do with WINE then.
  • edited May 2014
    ASH-II wrote: »
    ZX Updater:
    could you add a minimize button instead of the prompt when I press close
    even if I go to FILE:Exit it asks me if I want to exit or minimize (and minimize is the default) so it's another two buttons to exit

    if not then just remove the niggling exit prompt.....PLEASE.... :)

    I added the minimize button and captured it so that clicking closes the window (without asking) and keeps the program in the SysTray. Clicking on the exit button (top-right button), the prompt dialog still appears, but exiting is the default option - so pressing RETURN key exits the program.

    Selecting main menu option FILE --> Exit program exits the program without prompting.

    Would you say that's okay? The prompt on the exit button is still prompted because it could have been clicked by fault.

    If you don't agree I could remove the prompt completely.

    The changes come with the next release.

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

    Visit my ZX-Modules homepage with lot of free programs!
    Or visit my music-related website if you're interested in synthesizer music or computer animations and movies I've created
  • edited May 2014
    Today I want to tell something about my newest project: ZX-Assembler.

    I guess, this is the greatest challenge for me. Even if my knowledge of assemblers and the Z80 mnemonics is not the worst.

    Here I want to show you what's already working. I see high potential in that program, because it's very different to all those (even good) command line assemblers.
    Showing you my progresses will help to produce a useful and easy to use user interface for you.

    First of all, don't see any sense in the following example program. It's just thought for demonstration.

    Let's start with some lines of code. You may enter it in the 'Labels' and 'Commands' columns. Entering the commands is very similar to using Excel sheet. Also, I planned to make an 'auto-grow' list that automatically adds some lines when the bottom area is entered. The colon is not needed for entering labels.

    zxassembler01.jpg

    The code is compiled by clicking on the green check mark. Doing this, ZX-Assembler encodes each line and produces line addresses and the real code bytes in the left columns.

    If there's a DISPLAY command (refer to line 6), you'll get an entry in the popping tool window "Display output". In the above example, the variable $ is used for evaluating the current program counter. That way, the total size of code can be calculated with the EQU expression of label2.

    The found labels can be listed with the toggleable tool window "Found labels".

    In the next step we will change a line and produce a syntax error. I changed the PUSH hl to the illegal command PUSH a. Then, compiling again:

    zxassembler02.jpg

    Clicking on the popping error message, the cursor is placed to that line, of course.

    At any time, the addresses and bytes can be listed in hexadecimal instead.

    zxassembler03.jpg

    As the expression evaluator is decimal based, so commands with numbers like

    LD a,10

    will always produce the byte sequence 62,10. But of course, you may override that setting by using the number indicators. Eg.,

    LD a,10h

    produces the byte sequence 62,16 instead. ZX-Assembler understands all number indicators, Sjasm understands.

    Now, let's add a subroutine and a CALL to it:

    zxassembler04.jpg

    (please note that new-inserted code is red-coloured).

    Compiling this, produces the code as usual. Subroutines are coloured different to get easy to see that positions of the code.

    zxassembler05.jpg

    An interesting feature is to edit the bytes directly. Let's insert some bytes before the RET byte...

    zxassembler06.jpg

    zxassembler07.jpg

    pressing enter (or leaving the editor cell) will insert the dis-assembled code at that line position:

    zxassembler08.jpg

    Compiling is needed to bring these inserted bytes to life and to correct the label addresses:

    zxassembler09.jpg

    The jump relative problem has also be solved. In the following example, I inserted a DS 200 command (200 space bytes) before the DJNZ command. For that 7-bit jump addressing, this is out of range. In such cases, ZX-Assembler asks the user for replacing it by alternative code:

    zxassembler10.jpg

    Accepting this, produces absolute jumps:

    zxassembler11.jpg

    What works else:

    Very much like in ZX-Editor and ZX-Paintbrush, also ZX-Assembler can load any emulator-based file. The first found byte datablock will be loaded into the editor. Labels then are re-calculated in the best way, that is possible here. See the example loading a MCode block of a TAP file:

    zxassembler12.jpg

    zxassembler13.jpg

    I have no downloadable demo for you, but I hope the above pictures help to see how far my progresses went. If you have suggestions or questions about the above demonstrated steps, please post it here.

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

    Visit my ZX-Modules homepage with lot of free programs!
    Or visit my music-related website if you're interested in synthesizer music or computer animations and movies I've created
  • edited May 2014
    I've been considering trying another assembler for a while now, so am very excited about this.

    The features sound great, so far the only thing that springs to mind is the replacing jr and djnz with jumps. I like the idea of this - as long as you can easily track what is changed/where they are found when multiple.

    Thanks Claus.
  • edited May 2014
    R-Tape wrote: »
    The features sound great, so far the only thing that springs to mind is the replacing jr and djnz with jumps. I like the idea of this - as long as you can easily track what is changed/where they are found when multiple.

    I'd rather an error report when a relative jump is out of range. Instead of the assembler changing things automatic.

    It could get quite annoying with dialog boxes popping up all the time, with notification of options to alter things.

    First a basic error report, as in a regular assembler. Make an option to change a piece of code (relative to absolute) with a right-click menu on the assembly instead. Though I don't see why this feature would help.

    Better would be options to optimize a selection of code for size, speed or relocatable.
  • edited May 2014
    I've figured out the issue that was affecting the Mac port so if anyone is interested I can build a new version.
  • edited May 2014
    A useful feature would be to select a block of code and calculate how many tstates it takes to run. Useful for working out timing of loops.

    Edit:

    Also a directory filelist for the project. To support the sjasm [module] and incbin/include.
  • edited May 2014
    Great job, congratulations !!!

    I also think it would be good to calculate how many tstates Takes to Run.
  • edited May 2014
    R-Tape wrote: »
    I've been considering trying another assembler for a while now, so am very excited about this.

    The features sound great, so far the only thing that springs to mind is the replacing jr and djnz with jumps.
    I like the idea of this - as long as you can easily track what is changed/where they are found when multiple.

    Thanks Claus.

    Of course. If you reply the dialog (asking for auto-replacing to 16-bit jumps) with "no", the illegal jumps will be signed as errors.
    You can select one error message and the editor cursor jumps to that line. Refer to the following example:

    Let's have an example text message output program like this - being correct...

    zxassembler16.jpg

    ... When I inserted a define space with 1000 zero-bytes, I will get two error messages like these ...

    zxassembler17.jpg

    FrankT wrote: »
    I'd rather an error report when a relative jump is out of range. Instead of the assembler changing things automatic.
    It could get quite annoying with dialog boxes popping up all the time, with notification of options to alter things.
    First a basic error report, as in a regular assembler. Make an option to change a piece of code (relative to absolute) with a right-click
    menu on the assembly instead. Though I don't see why this feature would help.

    Of course, it will be possible to disable the mentioned asking dialog and permanently and let it reply "yes" or "no" without asking the user all the time.
    I also don't like annoying dialogs... :-) I think, some users may use this. But it's no problem to have this feature disabled by default. No problem at all.
    FrankT wrote: »
    Better would be options to optimize a selection of code for size, speed or relocatable.

    Hmm. I have no idea how to optimize code. Have you any example for that?

    aowen wrote: »
    I've figured out the issue that was affecting the Mac port so if anyone is interested I can build a new version.

    It may take some more weeks until I have a first fully usable demo (or beta version) of ZX-Assembler. They may be interested... :-)
    FrankT wrote: »
    A useful feature would be to select a block of code and calculate how many tstates it takes to run.
    Useful for working out timing of loops.

    Agreed. I checked my code and I see no problem to integrate a T-State info for each Mnemonic instruction. Here you see my source code and the
    two LOAD commands for 8-bit registers. LD A,B or so have 4 T-States, while LD B,(HL) or so have 7:

    zxassembler14.jpg

    This results in the ability to list the T-States of each line in a separate optional column:

    zxassembler15.jpg
    FrankT wrote: »
    Also a directory filelist for the project. To support the sjasm [module] and incbin/include.

    Of course. I know that we need such a feature. My thoughts about how this could be done at its best are not yet 100% complete, but I have some ideas. I will discuss that here when some things have been implemented.
    J.B. wrote: »
    Great job, congratulations !!!

    I also think it would be good to calculate how many tstates Takes to Run.

    Ok, thanks!

    Yes, I also think, especially for the coders of interrupt routines and graphics drivers :-) the T-State calculation will be important. I need some time
    to put in all those t-states, but this has to be done once.
    The next thing is implementing loops.

    I'm a bit afraid about these STRUCT and MACRO things. This definitely will need much time.... But we need this and I want as much as possible Sjasm compatibility.

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

    Visit my ZX-Modules homepage with lot of free programs!
    Or visit my music-related website if you're interested in synthesizer music or computer animations and movies I've created
  • edited May 2014
    FrankT wrote: »
    A useful feature would be to select a block of code and calculate how many tstates it takes to run. Useful for working out timing of loops.
    I guess, I did not understand you right about the T-State calculation...

    I think, now it's clear that you meant the total amount of T-States while running the machine code. My now implemented T-State display may be useful anyway, but without a real emulation, it's impossible to calculate the T-States of a code or part of code properly (especially when containing loops or conditional jumps).

    That's because of the fact that some instructions have not a fixed T-State time. E.g. JR C,DIS has two different T-States depending on the result of the condition.

    Let's take a look at the following code:

    zxassembler18.jpg

    The total T-State count of the loop depends on the value of hl. Only if we know all relevant register values at any time, a T-State calculation is possible. That needs an emulator implementation in ZX-Assembler.

    Do you see a way out of that problem?

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

    Visit my ZX-Modules homepage with lot of free programs!
    Or visit my music-related website if you're interested in synthesizer music or computer animations and movies I've created
  • edited May 2014
    clausjahn wrote: »
    Do you see a way out of that problem?

    Add a check box on each line called jump taken? and adjust the t-state total accordingly.
  • edited May 2014
    aowen wrote: »
    Add a check box on each line called jump taken? and adjust the t-state total accordingly.

    That's a good idea (but does not help for T-State counting in loops).
    As there are opcodes that have different tstates depending on value bc (e.g. LDIR), I should put the self-explaining caption on that button:
    E.g. "nc=true" or "bc<>0".

    Now, opcodes with different T-States are shown as e.g. 16/21 for LDIR.
    I'm now counting both values, if given, separately.
    So, instruction

    LDIR: LD a,b

    would state 20/25 (16/21 + 4/4)

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

    Visit my ZX-Modules homepage with lot of free programs!
    Or visit my music-related website if you're interested in synthesizer music or computer animations and movies I've created
  • edited June 2014
    Crisis wrote: »
    this is the same type of problem as with timing for screen tricks.
    if you want to pre calculate you could set a max of loops or inner jumps to be calculated.
    and there are more exceptions then rules ;-)
    a djnz can be an almost endless loop eg

    Indeed, Crisis. That's why my opinion is: I cannot count the t-states in such cases - except if I implement a real emulator. An emulator can calculate t-states easily.

    Besides of JR/JP/DJNZ loops you mentioned, I see assembler loops that can be counted (because the loop count is not variable, even if it's a calculated value), such as DUP...EDUP (see below).

    Last weeks I had to re-write the whole z80 assembler so that everything can be a calculated value, e.g. commands like SET (2*2),(hl) is a valid command (set 4,(hl)).
    And now, DUP and EDUP is functional. I have to test it for nested loops and the # operator that results the loop counter.

    Here a small example of a (useless) DUP loop:

    zxassembler19.jpg

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

    Visit my ZX-Modules homepage with lot of free programs!
    Or visit my music-related website if you're interested in synthesizer music or computer animations and movies I've created
  • edited July 2014
    Dear readers,

    I'm now on the way to make some interesting progresses. You may ask yourself: "who cares?", but it's important for me to keep you up-to-date, to prevent you from thinking "oh, he stopped working on it - another dead project!" :-)
    ZX-Assembler calculates repeat..endrepeat (or dup..edup) perfectly, as the following example shows:

    zxassembler20.jpg

    Right now, this is the first functional flow control. Now I try to implement conditional sections using IFDEF..ENDIF and all these situations.

    Here is a list of what is working now:

    - all mnemonics,
    - all undocumented mnemonics
    - DB, DW, DT, DD, DS and their synonyms (BYTE, WORD, TRIPLE, DWORD, BLOCK, DEFB, DEFW, DEFT, DEFD, DEFS)
    - ABYTE, ABYTEC, ABYTEZ, BYTEC, BYTEZ
    - MODULE..ENDMODULE
    - DUP..EDUP (REPT..ENDR, REPEAT..ENDREPEAT)
    - ORG
    - EQU
    - ASSERT
    - DISPLAY
    - DEFINE
    - ALIGN
    - handling of local and non-local labels
    - most of the expression functions, including @#, @@# (DUP counter), $ (current address), all arithmetics including trigonometric, average and min/max functions
    - condition negation e.g. JR !NC,<address> (= JR C,...)
    - multi-commands in one line, separated by colon ( : )

    Well, not enough to load and compile some of SjAsmPlus example files, but I'm working hard on it.

    There are lot of things to do, e.g.

    - STRUCT..ENDSTRUCT
    - MACRO..ENDMACRO
    - code pages,
    - Spectrum hardware definition
    - conditional code, e.g. IF..ELSEIF..ELSE..ENDIF
    - and some more time-eating stuff...
    - output

    I think, a test release for you is not too far away, but will take some more weeks (or months?).


    At this time, it's a good time to ask you, the future users, how to implement the file usage. Let's suggest some cases; none of the following suggestions is implemented now:

    Case 1: the user opens and edits an ASM file:
    =============================================
    Doing this, ZX-Assembler can be used as a pure editor. Compiling the code will check the syntax, determine the compiled code (bytes), but nothing special will happen.
    If some output commands are present, they would produce output files, e.g. .DAT or .BIN files. Also, TAP or TZX is imaginable here.
    On the other hand, if no output file has been defined, ZX-Assembler could produce a so-called 'list of datablocks', as you know from my other programs, e.g. ZX-Blockeditor. Of course with cut-and-paste abilities.
    This would be a good decision if you want to run the code with another program (e.g. ZX-Blockeditor).

    Saving an ASM file would put the data from my cell editor back into a formatted file, with labels just at the beginning, followed by the important column data, comments and (not yet) implemented repeaters.

    Case 2: the user opens and edits a SNA file:
    ============================================
    Doing this, ZX-Assembler would open any byte-based datablock, including SCREEN$ blocks, and all that. As the SNA reader now recognizes the BASIC program and variables area, as well as RAMTOP address, the memory data can be split-down to several sub-blocks, as in the following example (taken from ZX-Blockeditor):

    zxassembler21.jpg

    When opening such a datablock, ZX-Assembler will import the code, produces auto-labels, with names like sub_... for called labels or Lbl_... for normal labels, and - which cannot be prevented - maybe lot of senseless code (occurs on data sections or strings), like that:

    zxassembler22.jpg

    Editing such files produces a common problem: When the user edits the file (which is no problem), e.g. he adds new labels, changes sections or inserts macro and all that meta-code-stuff, where should I store the changed source code?
    The edited SNA could take the binary compiled code of course, but the changed source file is lost.
    On the other hand, in such cases of changed SNA file, I could generate an ASM file containing the complete changed source code.
    Opening the SNA again then should check whether a matching ASM file is present in the file folder.
    That's a real problem. It would be better solution, not being able to saving back a SNA file, but rather saving the file to a new file format, e.g. .ASMPRJ, containing all that file data (here: the modified SNA data as well as the ASM source code).

    Case 3: the user opens and edits a tape or disk file:
    =====================================================
    ZX-Assembler is now already able to open any multi-block file, e.g TAP, TZX, DSK and so on.
    If you read one datablock, it is red into ZX-Assembler's editor (pretty much as seen in case 2).
    Editing a datablock could be theoretically be done without problems, as a shorter compiled result could replace the datablock value easily.
    As in case 2, I have the same problem: where to place the modified ASM source code?
    For this file type the user could have changed many of the datablocks, resulting in probably numerous changed ASM source codes.

    The modified ASM source files could be stored as well inside the previous mentioned .ASMPRJ project files that holds the TAP (or whatever) file together with those ASM files.

    I hope you as the future users could help me to find the best way to solve the case 2 and 3 problems.

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

    Visit my ZX-Modules homepage with lot of free programs!
    Or visit my music-related website if you're interested in synthesizer music or computer animations and movies I've created
  • edited July 2014
    Hi Clausjahn,

    I am not a Z80 programmer but this project looks excellent. Having a state of the art IDE Z80 to start with will be great. Will you be able to step through the code, set breakpoints etc.?

    Many thanks

    Paddy
  • edited July 2014
    Hi Clausjahn,

    I am not a Z80 programmer but this project looks excellent. Having a state of the art IDE Z80 to start with will be great. Will you be able to step through the code, set breakpoints etc.?

    Many thanks

    Paddy

    As I already said above, stepping through the code need implementation of an emulator. So, it is good for creating Z80 code inside tapes, snapshots or ASM files, but not for running a program.
    Besides, it will be possible to run the code, but this will be done by sending the code to an emulator (via a prepared snapshot file).

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

    Visit my ZX-Modules homepage with lot of free programs!
    Or visit my music-related website if you're interested in synthesizer music or computer animations and movies I've created
  • edited July 2014
    Dear readers,

    I just want to tell you that ZX-Assembler starts 'knowing' how to handle procedure macros MACRO...ENDMACRO as well as text macros DEFINE, XDEFINE. See the following example:

    zxassembler23.jpg


    zxassembler24.jpg

    In opposite to Sjasm, ZX-Assembler checks DEFINE recursions.

    Now I'm about to handle parameters on MACROs and DEFINEs.

    As you see, I added a new column 'lengths' which displays the length in bytes for one or more commands per line (and it's important for the assembler).

    Each column display can be toggled. So, only what you want to see can be displayed :-)

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

    Visit my ZX-Modules homepage with lot of free programs!
    Or visit my music-related website if you're interested in synthesizer music or computer animations and movies I've created
  • edited August 2014
    To keep you updated, I want to inform you that the macro function is fully functional now.
    Referring to the SjASM documentation about macros...

    zxassembler25.jpg

    ... here's the result played with ZX-Assembler:

    zxassembler26.jpg

    Things are going faster now.

    Because I use the command separator : instead of \ (like in SjASM), I have to use = on macro default values instead of :
    I hope we can live with this syntax modifications. I really don't like the SjASM
    notation

    inc hl\inc de\push de

    I prefer

    inc hl: inc de: push de

    But, if the user prefer the SjASM notation, I could put an option "use SjASM separator" into ZX-Assembler, of course.

    I also performed a small nice program SjASM editor with which you can enter ASM code, run SjASM in a command line with the ASM code, grabbing the output bytes and error messages, and displaying them user-friendly.
    I'm using this for testing SjASM's syntax rather than exploring the (for me!) hard to understand C- source code... It's because the manual leaves many important questions unreplied...

    If someone is interested in SjASM editor, it can be published (without Installshield, simply put into a ZIP file) on my website in the ZX-Assembler section.

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

    Visit my ZX-Modules homepage with lot of free programs!
    Or visit my music-related website if you're interested in synthesizer music or computer animations and movies I've created
  • edited August 2014
    today I have implemented the if..elseif..else..endif clause into ZX-Assembler.
    To give you an impression of this, I wrote a small test program that checks the age by using a macro. if..elseif..else..endif works also outside a macro, of course and the else terms are optional. Also, different ongoing elseif terms are possible.

    zxassembler27.jpg

    No-one interested in the above mentioned SJASM-editor?

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

    Visit my ZX-Modules homepage with lot of free programs!
    Or visit my music-related website if you're interested in synthesizer music or computer animations and movies I've created
  • edited August 2014
    clausjahn wrote: »
    No-one interested in the above mentioned SJASM-editor?

    I would be interested in seeing what you have come up with. :)
  • edited August 2014
    Arjun wrote: »
    I would be interested in seeing what you have come up with. :)

    Okay, here we go.. :-)

    SjASMEditor can be downloaded here. It's nothing official, it's simply a windows gui which helps to produce sample files and the result bytes in a very simple byte notation. See the example here:

    sjasmeditor01.jpg

    Before you can use it, download sjasm42c file package from sourceforge.net.
    Then unpack it to a real folder on your hard disk (use paths without spaces).
    Then unpack my program somewhere and run it.

    sjasmeditor02.jpg

    You have to edit the path to sjasm.exe and the MSDOS command line editor cmd.exe before you can use my SjASM editor. To edit these, enable the options bar below and use the edit fields. The result should look like this example (paths may vary from your machine):

    sjasmeditor03.jpg


    Please note the syntax rules of sjasm, e.g. labels must stand at the beginning of a line, usual commands must have at least one space before them.

    How to use it?

    - enter a source code into the editor
    - you may save the source to an ASM file (but you need not)
    - click on the green run icon
    - await error messages or result bytes in the window below the editor.

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

    Visit my ZX-Modules homepage with lot of free programs!
    Or visit my music-related website if you're interested in synthesizer music or computer animations and movies I've created
  • edited August 2014
    I've added following new functions:
    IF..ELSEIF..ELSE..ENDIF
    IFDEF, IFNDEF
    IFB, IFNB
    WHILE..ENDWHILE
    full macro support including named and numerated parameters, accessible by names, @0, @1..etc and ROTATE,
    BREAK and CONTINUE for loops.

    For an early release the commands are enough. Still need an online help (syntax helper) and some more small stuff

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

    Visit my ZX-Modules homepage with lot of free programs!
    Or visit my music-related website if you're interested in synthesizer music or computer animations and movies I've created
Sign In or Register to comment.