Last modified by Max on 2025/03/02 15:18

From version 2.2
edited by Max
on 2025/02/25 11:56
Change comment: (Autosaved)
To version 1.14
edited by Max
on 2025/02/25 11:51
Change comment: (Autosaved)

Summary

Details

Page properties
Content
... ... @@ -15,6 +15,7 @@
15 15  * 177224 - Primary Boot Register (BOOT1)
16 16  * 177226 - Alternate Boot Register (BOOT2)
17 17  
18 +
18 18  The CSR register accepts commands in bits D0-D5 and the interrupt enable bit in bit D6, all write only, always zero is read. In bit D7, the readiness bit is read. One in it means that the previous command has been executed and the controller is ready for exchange. Zero means that the controller is busy executing the previous operation, the other registers are disabled, access to any of them will cause Trap to 4. If the execution of the previous command caused an error, bit D15 is set simultaneously with bit D7.
19 19  \\Writing to registers is done only in words; byte writing is not allowed.
20 20  \\All data exchange is conducted via DR. For commands with a single-word argument, this argument should be sent to DR, and then the command should be sent to CSR. For commands exchanging with the controller buffer, on the contrary, the command should be issued and only after it a data block of a certain length should be received or transmitted.
... ... @@ -283,16 +283,17 @@
283 283  {{code language="assembler"}}
284 284  ;...............................................................
285 285  
286 -CmdWri=006; symbolic name of the "Write
287 -; block" command
287 +CmdWri=006; символическое наименование команды "Писать
288 + ; блок"
288 288  
289 -; In R3 we have the DR address left over from the previous fragment.
290 -; We correct it to the CSR and send the
291 -; write command code there
290 +; В R3 у нас от предыдущего фрагмента остался адрес DR.
291 +; Исправляем его на CSR и пересылаем туда код команды
292 +; записи
292 292   MOV #CmdWri,-(R3)
293 -5$: TSTB @R3 ; Let's check the ready bit
294 - BPL 5$; Not ready -> we go and check again once
295 - TST @R3; Let's check for an error
294 +5$: TSTB @R3 ; Проверим бит готовности
295 + BPL 5$; Не готово -> уходим проверять еще
296 + ; раз
297 + TST @R3; Проверим на ошибку
296 296   BMI ERR5
297 297  
298 298  ;....................................................................
... ... @@ -299,14 +299,14 @@
299 299  {{/code}}
300 300  
301 301  
302 -== 007: Get disk size ==
304 +== **007: Получить размер псевдодиска** ==
303 303  
304 -There are two commands for obtaining the size of a pseudo-disk, i.e. the AZn file-image mounted on the selected pseudo-drive.
305 -\\If the OS being used (or a program working with disks without an OS) can work with large (more than 32M) disks, you should use the command with the code 017. The sequence of actions: reset the controller (command 000), select the drive (p. 3.2) and send the code 017 to the CSR, and then, without any waiting, read from DR first the lower word, and then the higher word of the size of the selected drive (image file).
306 -\\If the OS you are using cannot work with disks larger than 32M (RT-11), you should use the 007 command - get the pseudo-disk size with a limit of up to 32M. The steps are similar: reset the controller, select the disk, send the 007 code to the CSR and read one word of the pseudo-disk size from DR. If the size of the image file mounted on the selected pseudo-drive is larger than 65534 blocks, the controller returns the number 65534 instead of this "large" size. We remind you that the number 65535 is used in some places for special purposes and cannot be the disk size.
307 -\\We also remind you that if the image file is not mounted on this drive, the sequence of actions will not work (command 001 select device) and the program execution will simply not reach this point. Therefore, these commands do not provide for errors.
306 +Есть две команды получения размера псевдодиска, т.е. смонтированного на выбранный псевдопривод AZn файл-образа.
307 +\\Если используемая ОС (или программа, работающая с дисками без ОС) умеет работать с большими (больше 32М) дисками, следует пользоваться [[командой с кодом 017>>doc:||anchor="H017:A041F43E43B44344743844244C44043043743C43544043F44143543243443E43443844143A4302C43143E43B44C44843E439"]]. Последовательность действий: сбросить контроллер (команда 000), выбрать накопитель (п. 3.2) и переслать в CSR код 017, а затем, без каких-либо ожиданий, считать из DR сначала младшее, и следом за ним старшее слово размера выбранного накопителя (файл-образа).
308 +\\Если используемая ОС не умеет работать с дисками бОльшими, чем 32М (RT-11), следует пользоваться командой 007 - получить размер псевдодиска с ограничением до 32М. Действия похожие: сбрасываем контроллер, выбираем диск, посылаем в CSR код 007 и считываем из DR одно слово размера псевдодиска. Если размер файл-образа, смонтированного на выбранный псевдопривод, больше 65534 блоков, вместо этого "большого" размера, контроллер возвращает число 65534. Напоминаем, что число 65535 кое-где используется в специальных целях и не может быть размером диска.
309 +\\Также напоминаем, что если на этот накопитель не смонтирован файл-образ, последовательность действий не пройдет (команда 001 выбор устройства) и исполнение программы до этого места просто не дойдет. Поэтому ошибок у этих команд не предусмотрено.
308 308  
309 -Example of a program with "small" disks
311 +Пример программы с "малыми" дисками
310 310  
311 311  {{code language="assembler"}}
312 312  ;......................................