sjasmplus v1.16.0 is out

by Ped7g on 27-07-2020, 18:24
Topic: Development
Languages:

A new version of this multi-platform Z80 cross-assembler was released.

Shortened changelog since v1.14.1 release (1.14.1 was the last one in news here at msx.org):

  • Added i8080 mode (`--i8080` CLI option) (it's still Z80 Zilog syntax, just limited instruction set)
  • Added Sharp LR35902 mode (`--lr35902` CLI option) (100% syntax compatibility with IDA, 95% bgb)
  • Added `--longptr` option to allow labels outside of 16b address space
  • New `$$label` operator to retrieve page of label
  • Added export of SLD (Source Level Debugging) data
  • In lua scripts: `sj.calc(..)` (alias `_c(..)`) now substitutes defines and macro arguments
  • Error reporting inside LUA and MACRO refactored to give better info about origin of error
  • Added `BPLIST` and `SETBP` to export breakpoints info from asm for Unreal and ZEsarUX emulators
  • Added ZX-like devices with 2/4/8 MiB of virtual memory
  • `DEFARRAY` has new operator `[#]` to retrieve current size of array.
  • `MMU` has new optional third argument to set also address (like `ORG`)
  • `SAVETRD` refactored: fix couple of bugs and make TRD files conform the actual TR-DOS practice
  • Added relocation data generator (capable to produce executables for SymbOS, or your own relocation schemes)
  • Many fixes or small improvements all around, also docs improved over time

Relevant link: the latest release on this link.

Comments (8)

By santiontanon

Paragon (1074)

santiontanon's picture

28-07-2020, 22:59

I don't know much about sjasm or sjasmplus, but I've been learning about sjasm a bit recently. How is sjasmplus related to sjasm?

Also, just a quick question, why the new "$$label" syntax for "page of a label"? I thought there was syntax for this already. According to the sjasm manual ( http://www.xl2s.tk/sjasmman4.html ), this is ":label".

By ARTRAG

Enlighted (6430)

ARTRAG's picture

28-07-2020, 23:49

Sjasmplus forked from sjasm but diverged in such a way to make very hard to adapt sjasm code for the plus version.
They are not compatible. Moreover Sjasmplus nowaday seems mainly focused on other platforms, neglecting its MSX origins.

By NYYRIKKI

Enlighted (5590)

NYYRIKKI's picture

29-07-2020, 01:06

Quote:

Sjasmplus forked from sjasm but diverged in such a way to make very hard to adapt sjasm code for the plus version.

This sounds maybe a bit too harsh when you put it like that. Yes sure they are quite different today, but what I've seen ie. some earlier santiontanon sources, I don't think making a leap of faith would be an issue if that would be needed.

What I'm very happy about, this assembler has now needed properties to compile applications for SymbOS platform... That is something that other (even distantly) MSX related assemblers can't do.

By santiontanon

Paragon (1074)

santiontanon's picture

29-07-2020, 02:01

I see. I'm just curious. I had not paid much attention to the different assemblers until recently (I settled on Glass early on just because it was Java-based and thus I could use it easily cross-platform). But I have been looking at many other assemblers recently, and each of them is a world on their own with crazy fancy features Smile

By Ped7g

Rookie (22)

Ped7g's picture

29-07-2020, 08:09

santiontanon wrote:

I don't know much about sjasm or sjasmplus, but I've been learning about sjasm a bit recently. How is sjasmplus related to sjasm?

Also, just a quick question, why the new "$$label" syntax for "page of a label"? I thought there was syntax for this already. According to the sjasm manual ( http://www.xl2s.tk/sjasmman4.html ), this is ":label".

The sjasmplus-from-sjasm split happened way too long ago for me, I didn't study history of that too much, but I'm pretty sure the `:label` operator was not in sjasm back at that point, because "plus" added colon for multi-instruction-per-line separator, same like in BASIC, so it would be in direct clash with such operator. I was not even aware of its existence in sjasm.

The sjasmplus was done by Aprisobal, from my very limited knowledge I think back at that point development of sjasm was somewhat stale, but sources were available. That's like 2006 ( https://sourceforge.net/projects/sjasmplus/), the development progressed quite a lot and went a bit stale around 2008 maybe or something. (don't quote me on these :D )

Then around 2016 the czech/slovak ZX Spectrum fans were looking for some fixes, but nobody seemed to work on it, so z00m forked the sourceforce project onto github and they proceeded with their own fixes. Seems like few months later M.Koloberdin forked the sourceproject too and went with another fork https://github.com/sjasmplus/sjasmplus which is quite interesting too, he rewrote almost whole assembler with modern C++, but this one is also a bit different from z00m's in terms of features and syntax, as it was mostly focused on cleaning up the original source.

Then around early 2019 I was looking for some Z80 assembler for ZX Spectrum Next, and there was already some pull request to support Z80N extensions on the z00m's github which did need just review and few fixes, so I finished it. And while I was reviewing the PR, I got a glimpse of the rest of the source and spot few more bugs, so I started fixing the assembler itself, which lead to spotting even more bugs ... vicious cycle...

And that's how I got to the v1.16.0, my focus being on reliability and correctness (I would love to also refactor the source and make it more modern, but unfortunately just covering the current state with tests and fixing the bugs took way too long and too much energy, so it is what it is, I will maybe do "v2.0" one day in distant future, but not any time soon).

Please understand I didn't do any deep research into other options for Z80 assemblers, so "why didn't I pick XYZ" - most likely I didn't even knew it existed. Otherwise my criteria were quite simple: open source, C++, linux (so my initial assessment did include also pasmo ... original sjasm itself went under my radar, I think because it is not on github/gitlab but on its own web). Also I didn't want to spend much time on it and start with my ZX Next projects development ... *sigh* ... (didn't work that way at all, took ~10 months of assembler fixing)

By Ped7g

Rookie (22)

Ped7g's picture

29-07-2020, 08:19

ARTRAG wrote:

Sjasmplus forked from sjasm but diverged in such a way to make very hard to adapt sjasm code for the plus version.
They are not compatible. Moreover Sjasmplus nowaday seems mainly focused on other platforms, neglecting its MSX origins.

It's focusing on the things which contributors are focusing at, ie. in last 1.5y I did contribute 99% of changes to it ( https://github.com/z00m128/sjasmplus/graphs/contributors ) and my focus is ZX Spectrum Next. And I don't know anything about MSX, that's a fact.

Still "neglecting" sounds to me more negative than the real state is. Anyone is free to fork the project and add MSX specific features, and I'm always trying to listen to any feedback and help with pull request/patches to get them back to z00m's branch, so if you want to contribute to it, but you feel some kind of animosity toward MSX stuff, I'm very sorry, that should not be the case. MSX support is as welcome as any other Z80-like support in sjasmplus. (I would even consider non-Z80 things as valid extension, although the current architecture of sjasmplus is not very friendly for non-Z80 stuff, as the instruction parsing is mostly hard-wired in code, not driven by data tables like some other assemblers)

But of course also I have just limited amount of days on this Earth, so if you want *me* to add certain feature, there's some public-relation type of work on your side first to convince me I'm interested and that I need such feature. ;)

By santiontanon

Paragon (1074)

santiontanon's picture

29-07-2020, 18:21

Thanks for the explanations Ped7g! And please do not take my "why not :?" comment as a criticism. In my current project I have to add support for the syntax of different assemblers, and I am just learning about the differences and similarities between many of them, and that's why I am over-sensitive these days to differences in the syntax of different assemblers (the more they differ, the more work for me! hahaha). But indeed, we all have limited time, and we do this as a hobby, not as our job. So, just the fact that you and others decided to put time into a tool like this and make it available for free is fantastic Smile

By sd_snatcher

Prophet (3332)

sd_snatcher's picture

01-08-2020, 17:20

I'm a happy user of sjasmplus since the Aprisobal days and the positive experience with the developers was what kept me in. Aprisobal was a very nice guy to chat with, and so is the new team that took over the development.

This assembler also has a very high degree of compatibility with Microsoft MACRO-80, which is a must for me. And, as a bonus, it's widely used in ZX-Spectrum projects where I can borrow libraries, tools and even game projects to port.