yeah, of course sjasmplus will also assemble UTF8 source file, but then the resulting machine code is also UTF8 string, which is probably not what you want to process in Z80 assembly...
Technically whatever binary values you have in source within quotes, the `DB` will emit 1:1 as is, nothing is damaged, except three values having special meaning: 0, 10 and 13. Those three must be escaped like "\0\n\r".
So the issue is how to write your source in utf8, but assemble into some other encoding like cp1251. And Czechs may want cp1250, etc, etc... there's hundreds of difference encodings.
The more we discuss it, the more I'm inclining toward these preferences (from the most simple and robust to worst):
1) edit the source in target encoding, if your text editor allows it
2) iconv the whole source as part of the build step (I'm usually building from text editor, where I can enter the whole sequence `iconv | sjasmplus ...` for single-file projects, or I tend to use makefiles for multi-file projects)
3) some lua script calling iconv from inside the asm (or implementing custom encoding which is not available in iconv set)
4) ??
10) enter in source the numbers instead of text like `msgTxt: HEX cc ed e5 20 ee e4 ed ee ec f3 20 ea e0 e6 e5 f2 f1 ff`
Anyway, at this moment of time I believe the encoding translations should be not part of sjasmplus, so I don't plan to add utf8->cp1251. If you prefer the lua script for that, but you don't know how to create such "db_1251" macro, let me know, I will create more complete example.
(^^ Shadow Maker ^^, but also anyone else struggling with it)
The 8bit->8bit transformations - some magic syntax to define and use the translation easily -> this one would be nice addition, but I'm failing to see that magic syntax which makes it considerably better than what sjasmplus already could do now (you can for example put the translation table into the DEVICE memory, and use `{b table+char}` to translate it in expressions, or just calculate the value for cases like ASCII -> 5 bit, similar to this https://github.com/ped7g/ZXSpectrumN...cked.i.asm#L26 (although this example also packs the 5bit values into bit-stream, so it's more complicated than just simple conversion).
But in summary, I have no plans to add anything to sjasmplus right now, in my eyes the current support is reasonable, and the missing bits can be filled in by iconv or macro/lua scripts.
-----------------------------------
NEO: so... how about the global option disabling mid-word substitution? Do you think that's a good idea? To enable macro/define identifiers like `x`, but not substitute them into `label_x` then.






Ответить с цитированием
Размещение рекламы на форуме способствует его дальнейшему развитию 


