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
-
... ... @@ -505,24 +505,24 @@ 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назад,наDR524 + 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 ;...................................... ... ... @@ -529,27 +529,26 @@ 529 529 {{/code}} 530 530 531 531 532 -== **020:Получитьрасширенныйкоддиагностики**==532 +== 020: Get extended diagnostic code == 533 533 534 - Кодкоманды020,послесбросаконтроллераследуетвыдатьэтукомандувCSRизатемпрочитатьдвасловарасширеннойдиагностикиизDR.Командамгновенная,ожиданиенетребуется.534 +Command code 020, after resetting the controller, you should issue this command in the CSR and then read two words of extended diagnostics from DR. The command is instant, no waiting is required. 535 535 536 536 537 -== **027:Получитьверсиюfirmware AZ STM32**==537 +== 027: Get firmware version AZ STM32 == 538 538 539 -Код команды 027, возвращает 2 слова 540 -\\первое слово - 06404 = старший байт 13. это версия прошивки, младший байт 4. это версия железа - те AZБК в данном случае 541 -второе слово - 037 = это максимальный монтируемый диск - 31. 539 +Command code 027, returns 2 words 540 +\\first word - 06404 = high byte 13. this is the firmware version, low byte 4. this is the hardware version - i.e. AZБК in this case second word - 037 = this is the maximum mountable disk - 31. 542 542 543 543 544 544 {{code language="assembler"}} 545 545 ;------------------------------------------------------------- 546 -; получениеверсии прошивкиSTM32 -результатвR1ошибка545 +; getting STM32 firmware version - result in R1 R1=0 error 547 547 GTSTMV: MOV #AZ$CSR,R1 548 -1$: CLR (R1) ; Пошлемкоманду"Сброс"549 - TSTB (R1) ; Проверимготовностьконтроллера550 - BPL 1$ ; Еслинеготов,сбрасываемеще547 +1$: CLR (R1) ; Send "Reset" command 548 + TSTB (R1) ;Check controller readinessконтроллера 549 + BPL 1$ ; If not ready, reset again 551 551 mov #27,(R1) 552 - TST (R1)+ ; Проверяемнаошибку551 + TST (R1)+ ; Check for error 553 553 BMI 2$ 554 554 mov (R1),R1 555 555 return ... ... @@ -559,10 +559,10 @@ 559 559 {{/code}} 560 560 561 561 562 -== **030:Нетоперации**==561 +== 030: No operation == 563 563 564 - Основноеназначениеэтойкоманды-устанавливатьбитразрешенияпрерыванийотконтроллера.Командапередаетбитразрешенияпрерывания,которыйнаходитсяснейводномслове,ноневходитвеесостав(напоминаем,командарасполагаетсявбитахD0 - D5,абитразрешенияпрерываний-D6),всоответствующийтриггерконтроллераибольшеникакневлияетнапроцессывконтроллере.Управлениеэтимтриггеромработаетдажевсостоянии"Думаю,прошунемешать",иэтоглавнаяособенностькоманды"нетоперации".565 -\\ Командаимееткод0030.Посылка в CSRкода0130разрешитпрерыванияотконтроллера,посылкакода0030запретитих.Примернеприводитсявследствиетривиальностиего.563 +The main purpose of this command is to set the interrupt enable bit from the controller. The command transfers the interrupt enable bit, which is in the same word with it, but is not part of it (remember, the command is located in bits D0 - D5, and the interrupt enable bit is D6), to the corresponding trigger of the controller and does not affect the processes in the controller in any other way. Control of this trigger works even in the "Thinking, please do not interfere" state, and this is the main feature of the "no operation" command. 564 +\\The command has the code 0030. Sending the code 0130 to the CSR will enable interrupts from the controller, sending the code 0030 will disable them. An example is not given due to its triviality. 566 566 567 567 568 568 = **Блок команд работы с энергонезависимой памятью** =