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
-
... ... @@ -382,46 +382,50 @@ 382 382 Command code 013, the command reads the TOC record into the internal memory area and switches the pointer to it for data transfer via DR. The TOC must be open before this. 383 383 384 384 The procedure is as follows: 385 -• Сбросить контроллер. 386 -• Выдать в CSR команду "Прочитать запись оглавления" и дождаться ее окончания. 387 -• Выдать в CSR команду "Прочитать из памяти контроллера" 388 -• Прочитать из DR 11 слов записи оглавления 389 -\\Запись оглавления имеет формат: 390 -\\См. Имя Значение 391 -0 fSize Размер файла в байтах, младшее слово 392 -2 старшее слово 393 -4 fDate Дата в формате MS-DOS 394 -6 fTime Время в формате MS-DOS 395 -10 fAttr Атрибуты 1 байт 396 -11 fName ИМЯ.ТИП файла, 8+1+3+1 = 13 байт 397 -\\Смещения указаны восьмеричные. Формула в строке fName означает, что там сначала должно быть имя, максимально из восьми символов, далее должна быть точка, далее тип, до трёх символов, и завершающий нулевой байт 0х00. Если тип не указан, точка тоже не нужна. 398 -\\Атрибуты файлов в байте fAttr (восьмеричные): 385 +• Reset the controller. 386 +• Issue the command "Read the table of contents entry" to the CSR and wait for it to finish. 387 +• Issue the command "Read from controller memory" to the CSR 388 +• Read 11 words of the table of contents entry from DR 389 +\\The table of contents entry has the format: 390 + 391 +(% style="width:686px" %) 392 +|=(% style="width: 136px;" %)Offset (octal)|=(% style="width: 305px;" %)Name|=(% style="width: 242px;" %)Value 393 +|(% style="width:136px" %)0|(% style="width:305px" %)fSize|(% style="width:242px" %)File size in bytes, low word 394 +|(% style="width:136px" %)2|(% style="width:305px" %)fSize|(% style="width:242px" %)File size in bytes, high word 395 +|(% style="width:136px" %)4|(% style="width:305px" %)fDate|(% style="width:242px" %)Date in MS-DOS format 396 +|(% style="width:136px" %)6|(% style="width:305px" %)fTime|(% style="width:242px" %)Time in MS-DOS format 397 +|(% style="width:136px" %)10|(% style="width:305px" %)fAttr|(% style="width:242px" %)Attributes 1 byte 398 +|(% style="width:136px" %)10|(% style="width:305px" %)fName|(% style="width:242px" %)NAME.FILE TYPE, 8+1+3+1 = 13 bytes 399 + 400 + 401 +The offsets are specified in octal. The formula in the fName line means that there must first be a name, maximum of eight characters, then a period, then a type, up to three characters, and a terminating zero byte 0x00. If the type is not specified, the period is also not needed. 402 +\\File attributes in fAttr byte (octal): 399 399 \\001 - Read Only 400 400 002 - Hidden 401 401 004 - System 402 402 020 - Directory 403 403 040 - Archive 404 -\\ Примерпрограммы.408 +\\Example program 405 405 406 406 {{code language="assembler"}} 407 407 ;...................................... 408 -RdDir = 013; кодкоманды"Читатьзаписьоглавления"412 +RdDir = 013; command code "Read table of contents entry" 409 409 RdBuf = 015 410 410 411 411 MOV #AZ$CSR,R3 412 412 413 413 15$: CLR @R3; 414 - TSTB @R3; Сбросимконтроллер418 + TSTB @R3; Reset the controller 415 415 BPL 15$; 416 416 417 - MOV #RdDir,@R3; Попросимконтроллер418 -16$: TSTB @R3; прочитатьвсвоюпамять419 - BPL 16$; записьоглавления421 + MOV #RdDir,@R3; Ask the controller 422 +16$: TSTB @R3; to read into its memory 423 + BPL 16$; table of contents entry 420 420 421 421 MOV @RdBuf,(R3)+; 422 - MOV DIRREC,R2; Иперенесемеексебев423 - MOV #11.,R1; областьпамяти,указатель424 -17$: MOV @R3,(R2)+; накоторуюлежитвячейке426 + MOV DIRREC,R2; And transfer it to itself in 427 + MOV #11.,R1; memory area, pointer 428 +17$: MOV @R3,(R2)+; to which lies in cell 425 425 SOB R1,17$; DIRREC. 426 426 427 427 ;...................................... ... ... @@ -428,45 +428,46 @@ 428 428 {{/code}} 429 429 430 430 431 -== **014:Размонтироватьдиск**==435 +== 014: Unmount disk == 432 432 433 - Кодкоманды014,чтобыразмонтироватьдиск,следуетсброситьконтроллер,переслатьвDRконтроллераномерприводаAZ,которыйследуетразмонтировать,ипослатьвCSRконтроллеракод014,послечегодождатьсяокончанияоперации(онадлительная)ипроверитьнаошибку.Ошибкавыдается,еслиприводнебылсмонтирован.434 -[[ **//пример утилитыAZUMNT//**>>url:https://forum.maxiol.com/index.php?showtopic=5605&st=0&p=59418&#entry59418]]437 +Command code 014, to unmount the disk, you should reset the controller, send the AZ drive number to the controller DR, which should be unmounted, and send the 014 code to the controller CSR, then wait for the operation to complete (it takes a long time) and check for an error. An error is issued if the drive has not been mounted. 438 +[[AZUMNT utility example>>url:https://forum.maxiol.com/index.php?showtopic=5605&st=0&p=59418&#entry59418]] 435 435 436 436 437 -== **015:Начатьпередачусчитанногоблока**==441 +== 015: Start transferring the read block == 438 438 439 - Кодкоманды-015.Получивэтукоманду,контроллернастраиваетсянапословнуювыдачусодержимоготогосамоговстроенногобуферана256слов,которыебудутвыданыпоследовательночерезрегистрDR.Никакихожиданийнетребуется,простопересылаем256разсловоизDRвпоследовательныеячейкипамяти,ивсе.Еслинужноменьше,чем256слов(последнийукороченныйблокфайла),тоостатокможнопростобросить,несчитывая,сбросконтроллеравначалеследующейоперациисброситиэтотостаток.440 -\\ Примерпрограммы:443 +The command code is 015. Having received this command, the controller is configured to output word by word the contents of the same built-in buffer for 256 words, which will be output sequentially through the DR register. No waiting is required, we simply send a word from DR to sequential memory cells 256 times, and that's it. If less than 256 words are needed (the last shortened block of the file), then the remainder can simply be discarded without reading, resetting the controller at the beginning of the next operation will also reset this remainder. 444 +\\Example program: 441 441 442 442 {{code language="assembler"}} 443 443 ;.................................. 444 -RdBuf=015; символическоенаименованиекоманды448 +RdBuf=015; symbolic name of the command 445 445 446 -; ВR3отпредыдущегофрагментаосталсяадресCSR450 +; In R3 from the previous fragment there is the address of the CSR 447 447 ; (177220) 448 448 449 -; Считаем,чтоунасвR2находитсяадреспервогослова450 -; памяти,кудаследуетразместитьпрочитанныйблок.451 -; Программаполученияэтогоадресанеприводится.453 +; We assume that in R2 we have the address of the first word 454 +; of memory, where the read block should be placed. 455 +; The program for obtaining this address is not given. 452 452 453 - MOV #400,R1; Готовимсчетчикслов457 + MOV #400,R1; Prepare the word counter 454 454 ; 0400 oct = 256 dec 455 455 456 - MOV #RdBuf,(R3)+; ипересылаемкоманду457 -; RdBuf вCSR.АдресвR3укажетнаDR (177222).460 + MOV #RdBuf,(R3)+; and send the command 461 +; RdBuf to the CSR. The address in R3 will point to DR (177222). 458 458 459 -3$: MOV @R3,(R2)+ ;перешлемочередноесловов460 - память461 - SOB R1,3$; иповторимэто256 (0400)462 - ; раз463 +3$: MOV @R3,(R2)+we will send the next word to 464 +; memory 465 + SOB R1,3$; and repeat this 256 (0400) 466 + ; times 463 463 ;.................................. 464 464 {{/code}} 465 465 466 -Всё, чтение закончено. 467 -\\Для записи наоборот, требуется сначала перенести весь блок данных из памяти ЦП в контроллер и потом выдать команду "Записать содержимое буфера на диск" 470 +That's it, reading is complete. 468 468 472 +To write the opposite way, you first need to transfer the entire data block from the CPU memory to the controller and then issue the command "Write the contents of the buffer to disk" 469 469 474 + 470 470 == **016: Принять блок данных в буфер** == 471 471 472 472 Код команды 016. Команда настраивает контроллер на прием блока данных и помещении его в буфер. Следующие 256 циклов записи в DR поместят данные, переданные через МПИ, в буфер.