Z80 Assembly Meter v3.0.0

Por jltursan

Prophet (2619)

Imagen del jltursan

01-03-2022, 19:07

A couple of days ago, a new version of this great VSCode extension has been released with a new cool addition: user-defined macros metering.

All in all works fine; but I've found a little annoyance that maybe it's intented; but it's giving me some headaches.
The mnemonic "ex af,af" is no more a valid one and now a strict syntax, "ex af,af'" (notice the single quote) is needed to be metered.
Since long time, none of my code uses the "strict" version as the single quote has been always problematic with other editors and their syntax highlihgtning schemes; so I wonder, it's definitely a bug or it's really on purpose?

Login sesión o register para postear comentarios

Por Bengalack

Hero (580)

Imagen del Bengalack

01-03-2022, 19:18

Just a small comment: Workaround: For the highlighting issue, which happens to me in asm inlined in C, I always add a comment like this:

; '// comment here

Like this:

  ex af, af' ; '// comment here

works for me Smile

Por jltursan

Prophet (2619)

Imagen del jltursan

01-03-2022, 20:53

Haha, thanks!, it mostly works; but the comment highlightning is lost now! (this is using Notepad++). Using the following I'm near of a perfect syntax rendering:

ex af,af' ; ' ; comment here

Smile

Anyway, I've opened an issue in the project github; so let's see...

Por theNestruo

Champion (348)

Imagen del theNestruo

01-03-2022, 21:04

jltursan wrote:

A couple of days ago, a new version of this great VSCode extension has been released with a new cool addition: user-defined macros metering.

Hi, jltursan!
I don't use macros, so this feature is a little bit experimental. Please feel free to send me any issue Smile

jltursan wrote:

All in all works fine; but I've found a little annoyance that maybe it's intented; but it's giving me some headaches.
The mnemonic "ex af,af" is no more a valid one and now a strict syntax, "ex af,af'" (notice the single quote) is needed to be metered.
Since long time, none of my code uses the "strict" version as the single quote has been always problematic with other editors and their syntax highlihgtning schemes; so I wonder, it's definitely a bug or it's really on purpose?

Uh? It's not on purpose, but I don't know what change could have caused this in this version.
I guess you are an SjASMPlus user. I'm reviewing the code and I think the behaviour change could have been caused by a change in version 2.1.0: "Configuration property sjasmplusFakeInstructions renamed to sjasmplus". Check your settings.json and add "z80-asm-meter.sjasmplus": true. You'll probably find the old setting and it will appear dimmed as it not longer exists. Sorry for the inconvenience!
With that setting, ex af,af', ex af, af, ex af, and exa should be properly recognized (as well as any other SjASMPlus alternative syntax and fake instructions)

Por jltursan

Prophet (2619)

Imagen del jltursan

02-03-2022, 08:58

Nope, I'm a sjAsm (without plus) user and I've found the issue right after updating the extension. Of course I can be wrong; but I've been using the last version for a long time and I think I've metered a lot of "ex af,af" lines without problems before.

I'll try your suggestion and I'll report back the results ASAP!, thanks for this uber-cool extension! Smile

Por theNestruo

Champion (348)

Imagen del theNestruo

02-03-2022, 10:07

You are probably right. When I added support for SjASMPlus fake instructions I probably removed some of those alternate syntax from "standard" z80 instruction set as they appeared now in the "SjASMPLus instruction set".
I have been checking Sjasm 0.42 manual and, curiously, "ex af,af" is not documented! And it seems that there is a lot of sacrilegious syntax the extension does not support yet!!
I'll try to take a look at it this evening to restore the basic Sjasm alternate syntax without requiring the configuration setting to be set.
Alternative flag syntax, extended instructions (++ and --) and negative conditions will have to wait, as they require more changes in the base code (Are they commonly used, btw?)
Thank you very much for your reports!
Happy coding!

Por jltursan

Prophet (2619)

Imagen del jltursan

02-03-2022, 13:24

Cool!, about extended instructions, I'm specially using the "repeated" shortcut:

[8] OUTI ; 8 x OUTI instructions

Por jltursan

Prophet (2619)

Imagen del jltursan

02-03-2022, 18:53

Just to let you know that enabling the alternate Sjasmplus setting, the extension works as before, "EX AF,AF" is being parsed and metered correctly Smile

Por theNestruo

Champion (348)

Imagen del theNestruo

02-03-2022, 19:18

jltursan wrote:

Just to let you know that enabling the alternate Sjasmplus setting, the extension works as before, "EX AF,AF" is being parsed and metered correctly Smile

Great!
I plan on improve Sjasm support (with emphasis on Sjasm/SjASMPlus differences), but it will take some time so let's use that setting meanwhile Smile
Thank you for reporting!