Changes for page API контроллеров AZ®
Last modified by Max on 2025/03/02 15:18
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -113,59 +113,60 @@ 113 113 114 114 115 115 To perform these actions, you must send the required part of the block number bits to DR and then send the command code to CSR, after which you must check for an error. The commands are instantaneous, i.e. they are executed in one QBUS access cycle. 116 -\\Example of a program - 16-bit version : 116 +\\Example of a program - 16-bit version block number: 117 117 118 118 {{code language="assembler"}} 119 119 ;....................................... 120 120 121 -SetBlk=002; Символическоенаименованиекоманды122 -; " Установитьмладшие16разрядовномераблока"121 +SetBlk=002; Symbolic name of the command 122 +; "Set the lower 16 bits of the block number" 123 123 124 -; Отпредыдущегофрагмента в R3 остался адресDR125 -; (177222) 126 -; Считаем,чтовячейкесметкойBLCURнаходится16-127 -; разрядныйдисковыйадрес(номерблока,подлежащего128 -; вводуиливыводу).Процедураполученияэтогономеране129 -; показана124 +; The address DR 125 +; (177222) remained in R3 from the previous fragment 126 +; We assume that the cell labeled BLCUR contains the 16- 127 +; bit disk address (the block number to be 128 +; input or output). The procedure for obtaining this number is not 129 +; shown 130 130 131 - MOV BLCUR,@R3; ПомещаемвDRномерблока,132 - ; подлежащего обмену.131 + MOV BLCUR,@R3;We place the block number to be exchanged in DR. 132 + 133 133 134 - MOV #SetBlk,-(R3); ПосылаемкомандувCSR135 -; незабываем,адресвR3передпересылкойуменьшится на136 -; 2 итакимостанется134 + MOV #SetBlk,-(R3); We send the command to the CSR 135 +; do not forget that the address in R3 will decrease by 136 +; 2 before sending and will remain so 137 137 138 - TST @R3; Проверяемнаошибку138 + TST @R3; We check for an error 139 139 140 140 BMI ERR3 141 141 142 -; В32-разрядномвариантетежедействияследует143 -; повторитьдлястарших16разрядов(на самом деле,144 -; старших7,остальныедолжныбытьнулями,ибомаксимум145 -; размерапсевдодиска-4Г)дисковогоадреса.142 +; In the 32-bit version, the same actions should be 143 +; repeat for the senior 16 bits (actually, 144 +; senior 7, the rest should be zeros, because the maximum 145 +; size of a pseudo disk is 4G) of the disk address. 146 146 147 -; Обратитевнимание,чтовR3осталсяадресCSR,ане148 -; DR, каквдвухпредыдущихфрагментах.Этосделано149 -; специально.147 +; Note that in R3 the CSR address remains, and not 148 +; DR, as in the two previous fragments. This is done 149 +; on purpose. 150 150 151 151 ;....................................... 152 152 {{/code}} 153 153 154 154 155 -== **003:ОткрытьоглавлениеHFS**==155 +== 003: Open HFS Table of Contents == 156 156 157 -Последовательность действий 158 -\\• [[сбросить контроллер>>doc:||anchor="H000:A042143144043E44143A43E43D44244043E43B43B435440430"]] 159 -• подать в CSR команду "Принять блок данных в буфер" и передать пословно всю строку с полным текстом пути (Full Path) к требуемому оглавлению. Строка должна завершаться нулевым байтом (0х00) и быть не длиннее 384 байт (192 слов). 160 -• переслать в CSR код команды "Открыть оглавление" 161 -• дождаться ее окончания (команда длительная) 162 -• проверить на ошибку 157 +Sequence of actions: 163 163 164 -[[**//Пример утилиты - AZDIR//**>>url:https://forum.maxiol.com/index.php?s=&showtopic=5605&view=findpost&p=59418]] 159 +• reset the controller 160 +• send the command "Accept data block to buffer" to the CSR and transmit the entire line with the full path text (Full Path) to the required table of contents word by word. The line must end with a zero byte (0x00) and be no longer than 384 bytes (192 words). 161 +• send the "Open table of contents" command code to the CSR 162 +• wait for it to finish (the command is long) 163 +• check for errors 165 165 165 +[[Example utility - AZDIR>>url:https://forum.maxiol.com/index.php?s=&showtopic=5605&view=findpost&p=59418]] 166 166 167 -Пример программы: 168 168 168 +Example program: 169 + 169 169 {{code language="assembler"}} 170 170 ;............................. 171 171 AZ$CSR = 177220 ... ... @@ -173,46 +173,44 @@ 173 173 OpnDir = 003 174 174 175 175 MOV #AZ$CSR,R3 176 - 177 -; Ячейка DirPtr содержит указатель на начало поля с Full 178 -; Path. Считаем, что строка завершается тремя нулевыми 179 -; байтами, чтобы распознать по нулю окончание пересылки 180 -; строки пословно. Действительно, если количество 181 -; символов в строке четное, то следующие два байта нулей 182 -; образуют нулевое слово; если же нечетное, то один ноль 183 -; уйдет вместе с последним символом строки, а нулевое 184 -; слово образуют второй и третий нулевые байты, 185 -; оканчивающие строку. То есть, такое окончание строки, 186 -; передаваемой пословно, вполне надежно. 177 +; The DirPtr cell contains a pointer to the beginning of the field with Full 178 +; Path. We assume that the string is terminated by three zero 179 +; bytes in order to recognize the end of the transfer of the 180 +; string word by word by zero. Indeed, if the number of 181 +; characters in the string is even, then the next two bytes of zeros 182 +; form a zero word; if it is odd, then one zero 183 +; will go away with the last character of the string, and the zero 184 +; word is formed by the second and third zero bytes, 185 +; ending the string. That is, such an end of the string, 186 +; transferred word by word, is quite reliable. 187 187 MOV DirPtr,R2 188 188 189 - MOV #WrBuf,(R3)+; Подаемкоманду"Записьв190 - ; буфер"ипередаемстроку191 -11$: MOV (R2)+,@R3; пословно,дотех пор,192 - BNE 11$ ; поканеперешлется ноль189 + MOV #WrBuf,(R3)+; We issue the "Write to 190 + ; buffer" command and transmit the string 191 +11$: MOV (R2)+,@R3; word by word, 192 + BNE 11$ ;until zero is sent, 193 193 194 - MOV #OpnDir,-(R3); Подаемкоманду"Открыть195 - ; оглавление"194 + MOV #OpnDir,-(R3); We issue the "Open 195 + ; table of contents" command 196 196 197 -12$: TSTB @R3; иждем,когдаконтроллерее198 - BPL 12$; выполнит,199 - TST @R3; послечегопроверяемнаошибку.200 - BMI Err10; Ошибка-->197 +12$: TSTB @R3; and wait for the controller to 198 + BPL 12$; execute it, 199 + TST @R3; after which we check for an error. 200 + BMI Err10; Error --> 201 201 ;............................. 202 202 {{/code}} 203 203 204 204 == **004: Монтировать диск** == 205 205 206 -Порядок действий: 207 -• [[Сбросить контроллер>>doc:||anchor="H000:A042143144043E44143A43E43D44244043E43B43B435440430"]] 208 -• Переслать в контроллер строку с записью, подобной строкам описания дисков в файле AZ.INI 209 -• Выдать команду "Монтировать диск" 210 -• Дождаться ее окончания (команда длительная) 211 -• Проверить на ошибки 212 -На выбранный накопитель AZnn НЕ ДОЛЖЕН быть смонтирован диск. Если он таки смонтирован, перед монтированием туда нового диска следует размонтировать старый - команда 014 213 - 206 +Sequence of actions: 207 +• Reset the controller 208 +• Send a line to the controller with a record similar to the lines describing the disks in the AZ.INI file 209 +• Issue the "Mount disk" command 210 +• Wait for it to finish (the command is long) 211 +• Check for errors 212 +The selected AZnn drive MUST NOT have a disk mounted. If it is mounted, the old disk should be unmounted before mounting a new one - command 014 214 214 215 - Примерпрограммы:214 +Example program: 216 216 217 217 {{code language="assembler"}} 218 218 ;..................