Profi v3.2 -=- Speccy2010,r2
About {} ... if you would read the sources (that's how I found it)...(I think it was added already by Aprisobal back around first sjasmplus release)
About jp/Jp/jP/JP ... that's intentional choice of sjasmplus (I think it was decided maybe in original sjasm by Sj.M. himself)
instruction/directive must be all of the same case.
Labels/macros/defines are case sentitive.
I actually like it, because I use CamelCase for labels, so I have ~zero risk the assembler will pick one of them as instruction by accident.
But even if I would not like it, I don't think I would change one of the base choices of original sjasmplus, I don't "own" this project enough to introduce such massive change in behaviour.
в нашей отечественной ветке
https://github.com/sjasmplus/sjasmplus
уже пофикшено?
- - - Добавлено - - -
но когда правишь чужой код
у тебя появляются дополнительные проблемы
и это неудобно и раздражает
- - - Добавлено - - -
Код:SjASMPlus Z80 Cross-Assembler v.20190306.1 Pass 1 complete (0 errors) Pass 2 complete (0 errors) Pass 3 complete Errors: 0, warnings: 0, compiled: 16 linesдля меток это может и нужно (Label labeL LabEL)Код:04 0000 org $8000 05 8000 06 8000 07 8000 C3 0C 80 jp l1 08 8003 C3 0C 80 jP l1 09 8006 C3 0C 80 Jp l1 10 8009 C3 0C 80 JP l1 11 800C 12 800C 13 800C 00 l1 nop
но не для инструкций явно нет
- - - Добавлено - - -
попробуй сгенерировать контрольную сумму для 2-х 3-х байт ($1,$2,$4)
и посмотри что не так
просмотри значения на каждом шаге
Последний раз редактировалось NEO SPECTRUMAN; 01.06.2019 в 03:34.
I don't understand... I see (from address 02 to 1A)
too lazy to do the full 8b math in head, but I see the low nibbles 9 + 8 + 3 + 1 + 8 + 3 + 1 = 33 mod 16 = 1Код:20 50 49 38 30 20 20 20 20 20 20 43 01 00 40 08 40 20 20 20 20 20 20 43 41
So the "9" in 79 doesn't make sense with "The checksum is calculated as the simple arithmetic sum of all bytes starting" - seems like some other formula is used in TASM.
Seems to me like XOR instead of add... let me try that.
https://github.com/z00m128/sjasmplus...m_checksum.asm
Yes, with XOR the result is $79.
Код:MACRO CHK address .SUM = 0 ; init values for checksumming .ADR = address ASSERT address < $ ; starting address must be below current DUP $ - address ; do simple sum of all bytes .SUM = (.SUM + {.ADR})&$FF .ADR = .ADR + 1 EDUP DB .SUM display .SUM ENDM org $8000 l0 db $FF db $01 db $02 CHK l0Код:21 8000 01 db $01 22 8001 02 db $02 23 8002 04 db $04 24 8003 25 8003 26 8003 27 8003 28 8003 CHK l0 28 8003 07 > DB .SUMКод:21 8000 FF db $FF 22 8001 01 db $01 23 8002 00 db $00 24 8003 25 8003 26 8003 CHK l0 26 8003 00 > DB .SUMвполне себе правильно работаетКод:21 8000 FF db $FF 22 8001 01 db $01 23 8002 02 db $02 24 8003 25 8003 26 8003 CHK l0 26 8003 02 > DB .SUM
About jp/Jp/jP/JP ... well, there's the new `--syntax` option, which can be extended also to switch off instructions same-case sensitivity for particular piece of source, so I will look into it, how much difficult that would be.
But I don't want that "fix" as "default" at this moment (I may change my mind over time after thinking about it more, this is only telling you how I *feel* *now* = what you can expect in near future = no change or --syntax extension)
С любовью к вам, Yandex.Direct
Размещение рекламы на форуме способствует его дальнейшему развитию
Ok, in future release (or you can already build from github current master) this will come:
"--syntax=i" to make instructions/directives case insensitive ... I was hoping to add also "I" option to uppercase all labels, but that's not possible without finally rewriting the labels implementation, would be too much mess and work in current source.
(BTW, I still think you should rather reformat the old source, shouldn't be that much hard... but the option will be available too)
"opt" will get two more commands "listoff, liston" to suspend listing file from source (for macros like CHKXOR to not fill listing with useless DUP looping)
"{address}" is now "official" (in documentation), and I added "{b address}" variant to read only BYTE.
(I have no idea yet, when "1.13.2" will happen, the 13.1 was just released, so I'm in no hurry, will give it probably 2-4 weeks = so this is just early-access info)
Последний раз редактировалось Ped7g; 02.06.2019 в 20:54.
лично мне в sjasm/sjasmplus всегда не хватало библиотек, как это было, к примеру, у M80. Т.е. код чтобы собрать не в бинарь, а в некую либу, по мотивам всяких компиляторов си или тот же M80. А потом можно было бы прилинковывать из этой библиотеки функции/процедуры. Было бы удобно очень.
Эту тему просматривают: 1 (пользователей: 0 , гостей: 1)