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

From version 2.27
edited by Max
on 2025/02/25 13:56
Change comment: (Autosaved)
To version 2.29
edited by Max
on 2025/02/25 14:00
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -480,49 +480,49 @@
480 480  {{code language="assembler"}}
481 481  ;..................................
482 482  
483 -WrBuf=016; Символическое наименование команды
483 +WrBuf=016; Symbolic name of the command
484 484  
485 -; Перед записью нужно выполнить те же действия, что и в
486 -; пп. 3.1.-3.3. Обычно, это одна и та же программа,
487 -; просто после пункта 3.3. выполняется проверка "Что
488 -; требуется: чтение или запись?" и разветвление на
489 -; программу чтения или записи.
485 +; Before writing, you need to perform the same actions as in
486 +; pp. 3.1.-3.3. Usually, this is the same program,
487 +; just after point 3.3. a check is performed "What
488 +; is required: reading or writing?" and a branch is made to the
489 +; reading or writing program.
490 490  
491 -; После фрагмента в п. 3.3. в R3 остался адрес CSR
492 -; (177220). Будем считать, что в R2 находится адрес в
493 -; памяти ЦП, где находится блок, подлежащий записи.
494 -; Программа получения этого адреса не показана.
491 +; After the fragment in point 3.3., the CSR address
492 +; (177220) remains in R3. We will assume that R2 contains the address in the CPU
493 +; memory where the block to be written is located.
494 +; The program for obtaining this address is not shown.
495 495  
496 - MOV #400,R1; Готовим счетчик
496 + MOV #400,R1; Preparing the counter
497 497  
498 - MOV #WrBuf,(R3)+; Перешлем команду в CSR и
499 - ; переключим адрес в R3 на
500 - ; DR
498 + MOV #WrBuf,(R3)+; Let's forward the command to the CSR and
499 +; switch the address in R3 to
500 +; DR
501 501  
502 -4$: MOV (R2)+,@R3; Перешлем очередное слово
503 - ; данных
504 - SOB R1,4$; и повторим это 256 раз
502 +4$: MOV (R2)+,@R3; Let's forward the next word
503 +; data
504 + SOB R1,4$; and repeat this 256 times
505 505  ;..................................
506 506  {{/code}}
507 507  
508 -== **017: Получить размер псевдодиска, большой** ==
508 +== 017: Get ramdisk size, large ==
509 509  
510 -Есть две команды получения размера псевдодиска, т.е. смонтированного на выбранный псевдопривод AZn файл-образа.
511 -\\Если используемая ОС (или программа, работающая с дисками без ОС) умеет работать с большими (больше 32М) дисками, следует пользоваться командой с кодом 017. Последовательность действий: сбросить контроллер (п. 3.1), выбрать накопитель (п. 3.2) и переслать в CSR код 017, а затем, без каких-либо ожиданий, считать из DR сначала младшее, и следом за ним старшее слово размера выбранного накопителя (файл-образа).
512 -\\Если используемая ОС не умеет работать с дисками бОльшими, чем 32М (RT-11), следует пользоваться командой 007 - получить размер псевдодиска с ограничением до 32М. Действия похожие: сбрасываем контроллер, выбираем диск, посылаем в CSR код [[007>>doc:||anchor="H007:41F43E43B44344743844244C44043043743C43544043F44143543243443E43443844143A430"]] и считываем из DR одно слово размера псевдодиска. Если размер файл-образа, смонтированного на выбранный псевдопривод, больше 65534 блоков, вместо этого "большого" размера, контроллер возвращает число 65534. Напоминаем, что число 65535 кое-где используется в специальных целях и не может быть размером диска.
513 -\\Также напоминаем, что если на этот накопитель не смонтирован файл-образ, последовательность действий не пройдет (команда 001 выбор устройства) и исполнение программы до этого места просто не дойдет. Поэтому ошибок у этих команд не предусмотрено.
514 -\\Пример программы с большими дисками
510 +There are two commands to get the size of a pseudo-disk, i.e. the AZn file-image mounted on the selected pseudo-drive.
511 +\\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 (p. 3.1), 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).
512 +\\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.
513 +\\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.
514 +\\Example of a program with large disks
515 515  
516 516  {{code language="assembler"}}
517 517  ;......................................
518 518  
519 -GetBig=017; Получить "большой" размер диска
519 +GetBig=017; Get the "big" disk size
520 520  
521 -; От фрагмента 3.2 (выбор диска) у нас в R3 остался
522 -; адрес DR (177222)
521 +; From fragment 3.2 (disk selection) we have in R3
522 +; DR address (177222)
523 523  
524 - MOV #GetBig,-(R3); пошлем команду
525 - TST (R3)+; вернем адрес в R3 назад, на DR
524 + MOV #GetBig,-(R3); send the command
525 + TST (R3)+; return the address in R3 back to DR
526 526   MOV @R3,BigSiz
527 527   MOV @R3,BigSiz+2
528 528  ;......................................