PDA

Просмотр полной версии : ZX ASM 3- help



hood
16.12.2008, 17:00
Dear friends,

this weekend my friend showed me ZX ASM 3 assembler in emulator on JHCON Czech speccy party and I must say I am completely enthusiastic about it.

I know, today, there may be better assemblers, but I am thinking to rework its disk operations for MB02+, because I want to run ZX ASM 3 on my speccy with MB02+ disk interface. I have not Betadisk. And also all disk oparetions in ZXASM 3 are called in a standart way (CALL h3D13), so it should be not very complicated to write new disk operations.

Is here somebody, who could redirect me onto some document on the internet where I could find system info about ZX ASM 3? Source code, at best...

I mean informations, that would help me to convert disk operations for MB02+. I am looking into the code, but some things are still not very clear to me. TRDOS CALL h3D13 I found 24 times in the code. I am trying to find out principles of disk operations of ZXASM3.

Or do you know, if the author is still on the scene or do you have a contact to him? (authors in the ReadMe file are: Oleg Chochlov, Konstantin Afendikov and Vladimir Rubcov).

Thanks, guys

Hood

Добавлено через 21 минуту
I forgot to ask you about one thing. Could someone send me a source code for ZXASM 3??? I mean a long code with includes or sub-includes. I would work with it and discover what TRDOS calls are implemented.

my mail is [email protected]


Thanks a lot

Hood

spensor
16.12.2008, 18:55
The answer to your question can find here:
http://zx.pk.ru/showthread.php?t=215
http://zasm.by.ru/index.html

You can even ask Rubts0FF - http://zx.pk.ru/member.php?u=201, for example through E-mail.

axor
16.12.2008, 19:12
Author - http://zx.pk.ru/member.php?u=201

hood
17.12.2008, 02:10
Thanks everyone for help. I tried to contact the author, hopefully he will be able to answer.

Thanks for links, I found исходные тексты ZASM 3.10, ZASM 2.5, but unfortunatelly not 3.0:(((

Really, nobody has them?? I hope the author will be so kind and contact me.

Thanks again

Hood

Shadow Maker
17.12.2008, 10:24
3.10 is better & bugfixed version of 3.0, why not try to use it?

hood
17.12.2008, 10:51
3.10 is better & bugfixed version of 3.0, why not try to use it?

Hello Shadow Maker,

I know 3.10 is better and improved, but it uses overlays and more complicated TRDOS disk operations, I think. 3.10 is more bound to Betadisk and I guess it would be much harder to rework disk operations in 3.10 than 3.00.

Or, could you tell me, if in 3.10 standart TRDOS calls are used only? or some "dirty" calls are used?? maybe also memory organisation is more sophisticated. Is 3.10 able to use 128k machine only? We in the Czech Republic use only 128k machines, and no clones with extra memory. If standart calls are used and if 3.10 works with 128k memory, I could try to rework 3.10 version.

Thanks for answer

Hood

Shadow Maker
17.12.2008, 12:19
3.10 uses direct tr-dos programming, if I remember well. Also 3.10 works with 128k memory too, so there should be no problem. All you have to do is to locate the subroutine, which does all the load/save procedures and reprogramm it. But I never saw the sources, so my guesses may be wrong :) Author can tell you more detailed info, i believe.

Antipod
17.12.2008, 12:33
Or, could you tell me, if in 3.10 standart TRDOS calls are used only? or some "dirty" calls are used?? maybe also memory organisation is more sophisticated. Is 3.10 able to use 128k machine only? We in the Czech Republic use only 128k machines, and no clones with extra memory. If standart calls are used and if 3.10 works with 128k memory, I could try to rework 3.10 version.Try to use Unreal Speccy emulator for investigations. It has very flexible breakpoint mechanism ( conditional breakpoints ). This will make your life easier :)

spensor
17.12.2008, 12:49
Try to answer questions. I apologize for translation, using translate.google.com.
ZXASM version 3.10 is based on 3.0, and uses the same standard point of call for disk operations 3D13, IMHO. An alternative point of call for disk operations (3D2F) does not make sense to use, it is necessary for operations fast format discs and work with non-TR-DOS disks. System calls TR-DOS quite simple - to register C placed command code, in the other registers command parameters (track, sector, address RAM), and executed CALL #3D13.
ZXASM 3.10 requires a computer with a minimum of 128kb, but can be longer.

hood
18.12.2008, 13:27
Hi guys,

so, I have investigated version 3.0. Most of TRDOS 3d13 calls or jumps I have discovered (with service number in brackets):

MERGE, LOAD 85e5(eh)
SAVE, SAVE SETUP, SAVE BLOCK 84cb(12h), 84d6(bh)
SAVE OBJ 8541(8h),8564(12h)
CAT c6c4(5h), c734(5h) (page 14h)
LOAD FONT ca19(eh) (page 14h)
LOAD STS 8d1b(eh)
DRIVE CHANGE cbf2(1h), cbb1(18) (page 14h)
INCLUDE, INSERT 66a3(ah), 66ae(8h), 6718(5h)
MAKE 65b2(12h), 65b9(8), 6664(9h), 6676(9h)



however there remained several ones, that I do not know to whihch functions of ZASM they are linked:

661a
859a
c851
c876
c8c6

I also, did not found a TRDOS call for function ERASE FILE.

I found, that the pool begins on c012 in page 13h. That is probably the reason, why maximum size of pool is 16128 and not 16384. But, could you tell me one thing? It is clear, that the bigger the pool size is, the quicker is assembly function. BUT, what advantage does it bring to the user, he lowers pool size for example to 256 bytes? That is what I do not know.

I also suppose, that the maximum length of source code file is from about 31515 (do not know the exact adress form my head) till 65535. Is this right??

Yes, I forgot an important question. Do you have any ideas where I could safely place my new disk routines in the memory??? Is there any free RAM which I can use?

Could someone look into code and answer all my questions, please???


Thanks a lot


Hood

Antipod
19.12.2008, 18:34
please give link to the asm or attach. Failed to google it :) Found only 3.1.

hood
19.12.2008, 19:56
please give link to the asm or attach. Failed to google it :) Found only 3.1.

Here it is:
http://zasm.by.ru/-/download.shtml?/flz/za3.rar
But it is a program, not source files, I think source files for vesrion 3.0 do not exist any more. Authors are not answering my emails.


I have already found a TRDOS call for ERASE file function (it is c8c5), so only 4 calls remain.

What only makes me worry is MAKE function. I hope the program put 256 or more bytes into the buffer first and then save it on TRDOS disk. I hope, sequential writing is not used.

Could you, also please find out, if non standart calling of TRDOS is in ZASM3 used?

Thanks for help

Hood

Shadow Maker
19.12.2008, 21:05
ZASM 3.0 uses only standard TR-DOS functions.

spensor
20.12.2008, 09:02
Sequential writing in the file is not used, it is too difficult and it makes no sense.
Writing and reading directly from RAM, blocks of 256 bytes. An temporary buffer is not used.

Yes, I forgot an important question. Do you have any ideas where I could safely place my new disk routines in the memory??? Is there any free RAM which I can use?
The only section of memory to accommodate its own procedures is the area of system variables TR-DOS (#5CB6-#5D22), but must ZXASM completely separated from the TR-DOS calls.
The answers to many questions can find in this book http://trd.speccy.cz/book/TRDOSUA.ZIP. I think it's not a problem to translate it into English.

Rubts0FF
21.12.2008, 01:22
Итак, нужны исходники от ZAsm v3.0, с целью переделки под иную дисковую систему.
Я не против всевозможных доработок, но исходные тексты дать не могу.
Не по тому что мне жалко или так какие-то секретные алгоритмы, просто они являются примером, как не нужно писать программы :) (многочисленные попытки причесать исходники, приводили к их переработке, а это уже не 3.0. Я еще раз попробую).

Насколько я помню в ZAsm3 вызываются стандартные функции trdos и не имеют общей точки вызова.

ZAsm v3.10 легче подлежит переделке, т.к. имеет точку вызова функций работы с диском. Кто то уже переделывал для работы с HD.

Впрочем, я готов помочь. Для начала нужна информация о вашей дисковой
системе и желательно на русском, ну английском.

hood
21.12.2008, 02:10
Rubts0FF,

Zdravstvuj avtor:))),

spasiba za tvoju reakciju. spasibo, cto ty zdes:))) Ja nadejajus, cto ty ponimajes vot etot text.

Ja uze mnogo iz mojich voprosov rozresil. No mozes mne otvetit sleduscije, pozalujsta?
1) ja teper iskaju volnuju pamjat v RAM, ja znaju, cto v banke 4 (diskovoje operaciji) volnoje mesto. No mne by bylo lusce, kogda volnoe mesto bylo v standartnoj pameti do c000. No ja uze iskal, i nasel ot 5D3b (nacalo BASICa) do priblizitelno 6000. Etot mesto mogu upotrebit??

2) ja nasel sledujuscije CALLy TRDOSa, no ne znaju s kakoj funkcijej oni somknuty:
661a, 859a, c851, c876. Mozes mne skazat??

ja mogu teper skazat, cto ischodnie teksty mne ne nyzno, ja uze mnogo rozlicil z debugerra. No, ne znaju, pocemu vozmoznost ponizit POOL SIZE. Kakoj efekt eto prinasit???

Dla kakovo systema ja eto chocu prerabotat? Evo zovut MB02+. I u menja dokumentacija tolko na anglijskomu, zdes: http://hood.speccy.cz/dwnld/MB-02plusEnglishManual.zip

Mne ocen nravitsja versija 3.10, no ja dumaju ona samaja trudnaja po prerabotaniju na moj system. Ja popitalsja citat manual, no, je po russkomu mnogo ne govorju:((

Spasobo

Hood

Rubts0FF
21.12.2008, 02:54
:) Этот язык меня устраивает больше, чем английский :) Ну, в любом случае, здесь помогут нам понять друг друга.
По версии 3.0 я сам не много помню, вот POOL SIZE это обломок от v2.5, практического значения вроде бы не имеет.
Пока я ознакомлюсь с докой по MB02+ и решу что делать дальше, переведите пожалуйтса часть дока к 3.0 и 3.10 относительно распределения памяти в Zasm`ах.

Почта для связи [email protected]

Antipod
22.12.2008, 11:17
наскока понял MB02+ - натуральный эмулятор магнитофона. И самый простой путь - сделать save/load через пзушные подпрограммы ( для кассеты ). Кой-какие команды утрачивают смысл ( типо cat, erase file ) и появляется проблема с ассемблированием в файл, поскольку в этом случае пишется поблочно.
Вроде так.

spensor
22.12.2008, 11:56
Вообще то, MB-02 это далеко не эмулятор ленты. Это полноценная мультикарта со всем комплектом необходимых причендалов (FDD, HDD, DMA, RTC, Centronics). Как не удивительно, но у нас ничего подобного сделано не было. MB-02 по функционалу немного SMUC напоминает, но SMUC пасет задних.
Кому интересна схемотехника MB-02 (думаю для программиста инфа тоже интересна), ходим сюда: http://velesoft.speccy.cz/mb02/mb02_schematic_v2.0.gif

Antipod
22.12.2008, 12:14
Вообще то, MB-02 это далеко не эмулятор ленты.сорри, не совсем точно выразился. Имелось ввиду по отношению к save/load. Оно трапает обращение к процедурам ПЗУ и пишет вместо кассеты на диск.

spensor
22.12.2008, 13:27
hood а как с BSDOS работать из ассемблера?

hood
22.12.2008, 15:40
hood а как с BSDOS работать из ассемблера?

Hello,

it is very easy to write for BSDOS. It uses services.
Basically, BSDOS 308 (it is the latest version of BSDOS) uses 2 16kB SRAM pages (each one is paged in from 0-16384).

One contains BSROM118, normal ROM with special features, and this ROM is paged in most of the time, for normal work. The second contains BSDOS itself and you page it in, only when you need to work with disks. Paging is done through OUT instruction on port 23, so there is no auto paging like in TRDOS (eg. CALL 3d13h).

The BSDOS services are divided into two layers. The lower layer is FDC BIOS layer, like for example, reading and writing physical sectors- it has 17 services. The upper layer contains "upper routines" like loading a file, disk catalogue, disk search, 32bit arithemtics, etc...it has 50 services.

typically, code for calling a service looks like this:

Load:
.
.
page in BSDOS SRAM page
ld hl,file number
ld ix, adress
ld bc, sector number
ld e,number of sectors
ld a,LOAD service
rst #20
page in BSROM page
.
.

And that's it.

I would love to send you manual with services description, but it is still in Czech, so maybe I will translate it into English and then post it here.

As for tape operation emulation, you are correct, it is one of many BSDOS features. It works with every standart loader. But it, of course, does not work if there is a special loader. However, for re-work of ZX ASM 3.0 for MB02+ I will not use tape emulation, but standart service, as I am writing above.

BSDOS originated in 1996 and it is so genially written, that when we started to connect IDE disks to MB02+, only very small modification had to be done and we coul use hdd very comfortably.

I am already in contact with author RubtsOFF, and he promised to help, which is great. I already tested to load in ZASM 3.0 in MB02+ and it works perfectly. The hardest will be probably MAKE function, and CATALOGUE.

Tell me, please, can I assemble block in version 3.0 or assembly function works only for the whole text???

Also, would you be so kind, and tell me the main differences between version 3.0 and 3.10?? I know there is a manual but I am not very skilled in Russian language.


Thanks

Hood

Antipod
22.12.2008, 16:19
The hardest will be probably MAKE function, and CATALOGUE.

MAKE - if MB02+ has service like "append writing" - it should not be hard.
CATALOGUE - you have 2 choices:
1. routines that shows catalague should be modified.
2. you should produce catalogue in TR-DOS format ( but there will be limitations in file count - only 128 in TR-DOS )


Tell me, please, can I assemble block in version 3.0 or assembly function works only for the whole text???
whole text only.

spensor
22.12.2008, 16:55
hood Спасибо за ответ!
Похоже вы говорили про этот документ: http://tcg.speccy.cz/zoom/files/techm308.txt Теперь стало понятно как это работает. А нет ли исходных кодов (source) по работе с BSDOS? Интересно было бы ознакомится.

hood
22.12.2008, 17:26
hood Спасибо за ответ!
Похоже вы говорили про этот документ: http://tcg.speccy.cz/zoom/files/techm308.txt Теперь стало понятно как это работает. А нет ли исходных кодов (source) по работе с BSDOS? Интересно было бы ознакомится.


Hello Spensor,

oh, that is great I am BSDOS user and I did not know that we have translation of services also in English, sorry for not knowing:v2_conf2:


You can download source codes here, let me know, if you need more help with BSDOS:
http://www.8bc.com/sinclair/DOWNLOAD/BSDOS/bsdos.rar


Hood

Rubts0FF
22.12.2008, 19:14
В общем я подумал ..., и решил, какого черта. :) Вот исходники, отличаются от оригинальных удаленным меню, печати текста (которое и так было понтовым).

Тексты предоставлены для личного пользования (любого и каждого)!
Я категорически против их распространении и (или) публикации в и-нете. В первую очередь это касается свалки исходников zxopensource.

Это не последняя версия, не подумайте плохого, исходников. Они будут добавляться/разбавляться комментариями, по мере возникновения вопросов.

Вопросы здесь или по [email protected].

p.s.
Я опять забыл заплатить вовремя за и-нет, и не сегодня, завтра мне его отрубят, пока у прова на счете не появятся деньги. Кстати, последнее время переводы все дольше и дольше :(

И еще, что и как компилировать в ReadMe.txt, в z3p_src.trd копия того что в каталоге.

Rubts0FF
10.01.2009, 17:01
Слушайте, примите извинения. :) Я практически закрыл, потенциально флудийную тему. Imho. :)

hood
14.01.2009, 22:47
Dear friends,

I am prod to announce, that zasm 3.0 is finished and modified totally for MB02+ disk interface:v2_clapp:

Many many many thanks to everyone, who has helped me, a special one goes to RubtsOFF for hints and the source code.

I could not have finished my works without you. You can download my work on my website: http://hood.speccy.cz in download section.

Bolsoje spasibo:v2_thumb:

Yours Hood


teper popitajus po ruskomu

Dorogije druzja,

ja gordelivo oznakomlju, cto ja uspesno okoncil rabotu i modifikaciju zasma3.0 dlja MB02+ diskovoda.

Ocen bolsoje spasibo vsjem, kotoryje mnje pomogali, specialno RubtsOFF dlja evo covetov i isxodnikov.

Bez vas eto bylo by dlja menja ne vozmozno zakoncit uspesno moji raboti. Na mojej stranice http://hood.speccy.cz vy mozete moje delo zagruzit.

Vas Hood

Shadow Maker
14.01.2009, 23:07
Вот, и всегда по-русски пиши, всё понятно :) А какой бесплатный эмулятор эмулирует MB02+?

hood
14.01.2009, 23:39
V windows XP tolko RealSpec emulirujet MB02+. No stranica avtorov uze nesuscestvujet. Togda ty nado zagruzit zdes: http://velesoft.speccy.cz/other/realspectrum-emulator-last-version.zip Vsjo opisano, podobraj samuju lucsjuju versiju dlja tebe, RealSpec dlja Pentium ili dlja AMD.

No, tebe naverno budet escjo MBD disk image, s kotorovo ty budes v starte bootovat, i toze specialnaja EPROM 2kb, kotoraja nacinajet boot. Obe ty mozes zabguzit u menja:
http://hood.speccy.cz/dwnld/mb02.rom

i http://hood.speccy.cz/dwnld/MB02+ system disk+nmi menu.zip

V emulatore nazivaj F6 dlja vybora dikovoda (to podobrjaj etot MBD image) a F3 dlja vybora spekki modelja. To vozmi 128k spectrum i MB02+ diskovod. I potom, tebe nado pod F3 menju nazivat TAB i zadat specialnuju MB02+ ROM (2kB) i ty mozes MB02+ v emulatore ispolzovat. F2, etot nmi menu klavika, vvedjot tebe v moje nmi menju.

Dostatocno, tolko LOAD i nomer fajla i eto vsjo:) Kogda ty neznaes cevo to, skazi, ja pomogu. No tebe nado najti versiju RealSpeca, dlja tvojej konfiguracii, ili Pentium, ili AMD

Hood

Rubts0FF
15.01.2009, 02:29
ja gordelivo oznakomlju, cto ja uspesno okoncil rabotu i modifikaciju zasma3.0 dlja MB02+ diskovoda.
Поздравляю.

Shadow Maker
15.01.2009, 10:38
hood, угу... А почему ты там некрасиво вывод каталога сделал? Там же был хороший выводчик каталога, мог бы им воспользоваться. А то на белом фоне квадратным спектрумским шрифтом как-то некрасиво смотрится. И ошибки все через такой шрифт и так далее...

hood
15.01.2009, 16:43
hood, угу... А почему ты там некрасиво вывод каталога сделал? Там же был хороший выводчик каталога, мог бы им воспользоваться. А то на белом фоне квадратным спектрумским шрифтом как-то некрасиво смотрится. И ошибки все через такой шрифт и так далее...

Shadow Maker, ty pravilno. No ja ocen cmotril funkcionalnost i ne esteticnost. Ja toze nespravil vybor diskovoda, vsjko eto vozmozno sdelat iz nmi menu. Uze ne tolko vremeni bylo u menja..... No i toze MB02+ disks imeet ne tolko 128 fajlov no tiscjuce fajlov..... ja prosto xotel tolko funkcionalnost

Hood

Shadow Maker
15.01.2009, 19:20
Нет, понятно что может быть много файлов, ты просто мог бы грузить вот скажем по частям эти файлы, выводить эту часть в красивом виде и потом дальше следующую часть каталога и далее целиком. Ну красивее было бы. Понятно, что так проще - взял уже готовую и напечатал, но вот скажем дисковые ошибки зачем шрифтом из ПЗУ печатать? Не придираюсь, просто интересно зачем ты заменил уже готовые окошки с ошибками на свои, которые выглядят хуже.

Ну так-то понятно, что хотел побыстрее и лишь бы работало. Выпускай следующую версию, чтобы было еще и красиво :)