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
-
... ... @@ -445,83 +445,84 @@ 445 445 446 446 {{code language="assembler"}} 447 447 ;.................................. 448 -RdBuf=015; символическоенаименованиекоманды448 +RdBuf=015; symbolic name of the command 449 449 450 -; ВR3отпредыдущегофрагментаосталсяадресCSR450 +; In R3 from the previous fragment there is the address of the CSR 451 451 ; (177220) 452 452 453 -; Считаем,чтоунасвR2находитсяадреспервогослова454 -; памяти,кудаследуетразместитьпрочитанныйблок.455 -; Программаполученияэтогоадресанеприводится.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. 456 456 457 - MOV #400,R1; Готовимсчетчикслов457 + MOV #400,R1; Prepare the word counter 458 458 ; 0400 oct = 256 dec 459 459 460 - MOV #RdBuf,(R3)+; ипересылаемкоманду461 -; 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). 462 462 463 -3$: MOV @R3,(R2)+ ;перешлемочередноесловов464 - память465 - SOB R1,3$; иповторимэто256 (0400)466 - ; раз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 467 467 ;.................................. 468 468 {{/code}} 469 469 470 -Всё, чтение закончено. 471 -\\Для записи наоборот, требуется сначала перенести весь блок данных из памяти ЦП в контроллер и потом выдать команду "Записать содержимое буфера на диск" 470 +That's it, reading is complete. 472 472 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" 473 473 474 -== **016: Принять блок данных в буфер** == 475 475 476 -Код команды 016. Команда настраивает контроллер на прием блока данных и помещении его в буфер. Следующие 256 циклов записи в DR поместят данные, переданные через МПИ, в буфер. 477 -\\Пример программы. 475 +== 016: Receive data block into buffer == 478 478 477 +Command code 016. The command sets the controller to receive a block of data and place it in the buffer. The next 256 write cycles to DR will place the data transferred via the QBUS in the buffer. 478 +\\Example program: 479 + 479 479 {{code language="assembler"}} 480 480 ;.................................. 481 481 482 -WrBuf=016; Символическоенаименованиекоманды483 +WrBuf=016; Symbolic name of the command 483 483 484 -; Передзаписьюнужновыполнитьтежедействия,чтоив485 -; пп. 3.1.-3.3.Обычно,этооднаитаже программа,486 -; простопослепункта3.3.выполняетсяпроверка"Что487 -; требуется:чтениеилизапись?"иразветвлениена488 -; программучтенияилизаписи.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. 489 489 490 -; Послефрагментавп.3.3.вR3 остался адресCSR491 -; (177220). Будемсчитать,чтовR2находитсяадресв492 -; памятиЦП,гденаходитсяблок,подлежащийзаписи.493 -; Программаполученияэтогоадресанепоказана.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. 494 494 495 - MOV #400,R1; Готовимсчетчик496 + MOV #400,R1; Preparing the counter 496 496 497 - MOV #WrBuf,(R3)+; ПерешлемкомандувCSRи498 - переключимадресвR3на499 - 498 + MOV #WrBuf,(R3)+; Let's forward the command to the CSR and 499 +; switch the address in R3 to 500 +; DR 500 500 501 -4$: MOV (R2)+,@R3; Перешлемочередноеслово502 - данных503 - 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 504 504 ;.................................. 505 505 {{/code}} 506 506 507 -== **017:Получитьразмерпсевдодиска,большой**==508 +== 017: Get ramdisk size, large == 508 508 509 - Естьдвекомандыполученияразмерапсевдодиска,т.е.смонтированногонавыбранныйпсевдоприводAZnфайл-образа.510 -\\ ЕслииспользуемаяОС(илипрограмма,работающаясдискамибезОС)умеетработатьсбольшими(больше32М)дисками,следуетпользоватьсякомандойскодом017.Последовательностьдействий:сброситьконтроллер(п. 3.1),выбратьнакопитель(п. 3.2)ипереслатьвCSRкод017,азатем,безкаких-либоожиданий,считатьизDRсначаламладшее,иследомзанимстаршеесловоразмеравыбранногонакопителя(файл-образа).511 -\\ ЕслииспользуемаяОСнеумеетработатьсдискамибОльшими,чем32М(RT-11),следуетпользоватьсякомандой007 -получитьразмерпсевдодискасограничениемдо32М.Действияпохожие:сбрасываемконтроллер,выбираемдиск,посылаемвCSRкод[[007>>doc:||anchor="H007:41F43E43B44344743844244C44043043743C43544043F44143543243443E43443844143A430"]]исчитываемизDRоднословоразмерапсевдодиска.Еслиразмерфайл-образа,смонтированногонавыбранныйпсевдопривод,больше65534блоков,вместоэтого"большого"размера,контроллервозвращает число65534.Напоминаем,чточисло65535кое-гдеиспользуетсявспециальныхцеляхинеможетбытьразмеромдиска.512 -\\ Такженапоминаем,чтоеслинаэтотнакопительнесмонтированфайл-образ,последовательностьдействийнепройдет(команда001выборустройства)иисполнениепрограммыдоэтогоместапростонедойдет.Поэтомуошибокуэтихкоманднепредусмотрено.513 -\\ Примерпрограммысбольшимидисками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 514 514 515 515 {{code language="assembler"}} 516 516 ;...................................... 517 517 518 -GetBig=017; Получить"большой"размердиска519 +GetBig=017; Get the "big" disk size 519 519 520 -; Отфрагмента3.2 (выбордиска)унасвR3остался521 -; адресDR (177222)521 +; From fragment 3.2 (disk selection) we have in R3 522 +; DR address (177222) 522 522 523 - MOV #GetBig,-(R3); пошлемкоманду524 - TST (R3)+; вернемадресвR3назад,наDR524 + MOV #GetBig,-(R3); send the command 525 + TST (R3)+; return the address in R3 back to DR 525 525 MOV @R3,BigSiz 526 526 MOV @R3,BigSiz+2 527 527 ;......................................