SAVC(18.06.2021)
С любовью к вам, Yandex.Direct
Размещение рекламы на форуме способствует его дальнейшему развитию
it should be visible in listing, that the address after ORG is not what you expected... (I'm hinting to use listing files often, when you see unexpected result from assembler, often the listing shows where the wrong result start, and then you can search for real reason)
ALIGN 256 is probably least error prone, if I would be forced to use ORG, I would use probably something like `($+255)&$FF00`, but that's still a bit complex = more room for error.
Glad it works now, if you have further issue, post again. Have fun.
main.a80
slave.a80Код:org 50000 ... include "slave.a80" Label1 ....
При компиляции Label1 возвращает адрес относительно slave.a80 (т.к. там org 30000). Есть какой нибудь механизм, чтобы включённый дополнительный исходный файл с частью кода выделенным адресом по ORG (здесь он стал от 30000) не влиял на Label1. А продолжал бы компилировать код от основного ORG, который был от 50000?Код:... org 30000 ....
Вариант. Но если подключать нужно много разных сорцов, где много разных процедур, одноразовых или постоянных. Типа, как с "кучей" и "мусором" нужен механизм, хотя бы точка сборки.
И, ещё, тогда вопрос, как узнать при компиляции (в .sna) размер куска кода, либо того же slave.a80? Ещё бы в .sna это где-нибудь записать.
Есть DISPLAY "Show len",/A,$-Start
Выдаст в консоль при компиляции.
Подробности в мануале.
Личка заполнена! И чистить я ее не буду! Пользуйтесь адекватными средствами связи! Спасибо.
Seamos realistas y hagamos lo imposible!
Ernesto Che GuevaraПереехал сюда: SteinBlume (ex ATM CP/M Explorer)
http://era-cg.su
Biland(28.06.2021)
Heavy on the disasm
Eric and the disasm
Mask 3: Venom strikes disasm
Bard's disasm
There is no "stack" to push/pop current address, but for simple code just to preserve/restore original address you can do either in main or in slave file:
But I would rather consider moving `include "slave.a80"` to different part of source, like at beginning or end, so it's own `org` doesn't interefere with flow of main.Код:org 50000 ... old_main_pc = $ include "slave.a80" org old_main_pc Label1 ....
To get size of the piece of code, use labels and subtract them (`block_end-block_start` or `$-block_start` at the end of the block).
SAVESNA dumps "current" virtual memory of the device, all things assembled before the savesna line, but not the things assembled after.
Что-то ему не нравится.Код:\SJAsm\Source\main.a80(232): error: Unrecognized instruction: old_main_pc = $ \SJAsm\Source\main.a80(232): error: Label not found: old_main_pc
Эту тему просматривают: 1 (пользователей: 0 , гостей: 1)