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
-
... ... @@ -1034,15 +1034,14 @@ 1034 1034 {{code language="assembler"}} 1035 1035 ;-------------------------------------------------- 1036 1036 ; 76th page map - we prepare data for the screenshot command there 1037 -SCR_PAGE = 130000 ; we temporarily attach the 76th page to the 77th - that is, into the 130000 window 1038 -SCR_TAG = SCR_PAGE+0 ; here is the input - 240 - 1 word 1039 -SCR_ADDR_CONF 1040 -SCR_PAGE_CONF 1037 +SCR_PAGE = 130000 ; we temporarily attach the 76th page to the 77th - that is, into the 130000 window 1038 +SCR_TAG = SCR_PAGE+0 ; here is the input - 240 - 1 word 1039 +SCR_ADDR_CONF = SCR_TAG+2 ; here is the command with addresses - address+length 24 bits - 4 words 1040 +SCR_PAGE_CONF = SCR_ADDR_CONF+8. ; here is the command with pages - the starting page and the number of pages - 2 words 1041 1041 SCR_MEM_CONF = SCR_PAGE_CONF+4. ; here is the memory configuration from the registers - 22 words 1042 1042 SCR_VGA_CONF = SCR_MEM_CONF+44. ; here video controller configuration - 10 words 1043 -SCR_PAL = SCR_VGA_CONF+20. ; here 338. values ??(words) of palette 338 words1043 +SCR_PAL = SCR_VGA_CONF+20. ; here 338. values (words) of palette 338 words 1044 1044 ;-------------------------------------------------- 1045 - 1046 1046 ; trap 41 - preparation of default information for screenshot functionality 1047 1047 PrepSRC: jsr R5, PUSHA ; batch saving of registers 1048 1048 mov @#177326,-(SP) ; save page 130k which was before the call ... ... @@ -1138,79 +1138,78 @@ 1138 1138 Example program 1139 1139 1140 1140 {{code language="assembler"}} 1141 -; обновиминформациювхидерескриншота1140 +; update the information in the screenshot header 1142 1142 ;-------------------------------------------------- 1143 -; карта76йстраницы-тудамыготовимданныедлякомандыскринщотов1144 - 70000уюстраницуцепляемнаместо77йвременно-тевокно1300001145 - тутвход- 240 - 1слово1146 - сюдакомандусадресами-адрес+длина24бита- 4слова1147 - сюдакомандусостраницами-начальнаястраницаиколичествостраниц- 2слова1148 - cюдаконфигурациюпамятиизрегистров- 22слова1149 - сюдаконфигурациювидеоконтроллера- 10cлов1150 - сюда338.значений(слов)палитры338слов1142 +; 76th page map - we prepare data for the screenshot command there 1143 +SCR_PAGE = 130000 ; we temporarily attach the 76th page to the 77th - that is, into the 130000 window 1144 +SCR_TAG = SCR_PAGE+0 ; here is the input - 240 - 1 word 1145 +SCR_ADDR_CONF = SCR_TAG+2 ; here is the command with addresses - address+length 24 bits - 4 words 1146 +SCR_PAGE_CONF = SCR_ADDR_CONF+8. ; here is the command with pages - the starting page and the number of pages - 2 words 1147 +SCR_MEM_CONF = SCR_PAGE_CONF+4. ; here is the memory configuration from the registers - 22 words 1148 +SCR_VGA_CONF = SCR_MEM_CONF+44. ; here video controller configuration - 10 words 1149 +SCR_PAL = SCR_VGA_CONF+20. ; here 338. values (words) of palette 338 words 1151 1151 ;-------------------------------------------------- 1151 + mov @#177326,R5 ; save page 130k which was before the call 1152 + mov #76,@#177336 ; hook the 76th page into the window 1152 1152 1153 - mov @#177326,R5 ; сохраним страницу 130k которая была до вызова 1154 - mov #76,@#177336 ; цепляем 76ую страницу в окно 1155 - 1156 - ;конфигурация видеоконтроллера 1154 + ;video controller configuration 1157 1157 ; 177230-177256 1158 1158 mov #SVGAC,R4 1159 1159 1160 - mov @#177230,(R4)+;177230 - региструправления1161 - mov @#177232,(R4)+;177232 - регистрверхняястраница(слой0)1162 - mov @#177240,(R4)+;177240 - регистрсредняястраница(слой1)1163 - mov @#177242,(R4)+;177242 - регистр-нижняястраница(слой2)1164 - mov @#177244,(R4)+;177244 - регистрвертикальногоскролингаслой21165 - mov @#177246,(R4)+;177246 - регистрвертикальногоскролингаслой11166 - mov @#177250,(R4)+;177250 - регистрвертикальногоскролингаслой01167 - mov @#177252,(R4)+;177252 - регистргозизонтальногоскролингаслой01168 - mov @#177254,(R4)+;177254 - регистргозизонтальногоскролингаслой11169 - mov @#177256,(R4)+;177256 - регистргозизонтальногоскролингаслой21158 + mov @#177230,(R4)+;177230 - control register 1159 + mov @#177232,(R4)+;177232 - register - top page (layer 0) 1160 + mov @#177240,(R4)+;177240 - register - top page (layer 1) 1161 + mov @#177242,(R4)+;177242 - register - top page (layer 2) 1162 + mov @#177244,(R4)+;177244 - vertical scroll register layer 2 1163 + mov @#177246,(R4)+;177246 - vertical scroll register layer 1 1164 + mov @#177250,(R4)+;177250 - vertical scroll register layer 0 1165 + mov @#177252,(R4)+;177252 - horizontal scroll register layer 0 1166 + mov @#177254,(R4)+;177254 - horizontal scroll register layer 1 1167 + mov @#177256,(R4)+;177256 - horizontal scroll register layer 2 1170 1170 1171 - mov R5,@#177336; вернемстраницускоторойбылвызов1169 + mov R5,@#177336; return the page from which the call was made 1172 1172 1173 1173 1174 1174 ;------------------------- 1175 - MOV #AZ$CSR,R3 ; ГотовимCSRконтроллера1176 - MOV #AZ$DR,R4 ; ГотовимDRконтроллера1177 -20$: CLR (R3) ; Сбросимконтроллер1173 + MOV #AZ$CSR,R3 ; Preparing controller CSR 1174 + MOV #AZ$DR,R4 ; Preparing controller DR 1175 +20$: CLR (R3) ; Reset the controller 1178 1178 TSTB (R3) 1179 1179 BPL 20$ 1180 1180 1181 - ; очистимблокпамятидляимени-дабысистемасделаладефолтноеимяфайла1182 - mov #23,(R3) ; командуемчтобудемписатьданныевбуфер1183 -128$: TSTB (R3) ; проверяемрезультатвыполнения1184 - BPL 128$ ; ждем1179 + ; clear the memory block for the name - so that the system makes a default file name 1180 + mov #23,(R3) ; command that we will write data to the buffer 1181 +128$: TSTB (R3) ; check the result of execution 1182 + BPL 128$ ; wait 1185 1185 clr R1 1186 1186 1187 1187 mov #256.,R2 ; 1188 -129$: mov R1,(R4) ; отдаемвконтроллер1186 +129$: mov R1,(R4) ; give to the controller 1189 1189 sob R2,129$ 1190 1190 1191 1191 1192 - MOV #044,(R3) ; командаскриншот1190 + MOV #044,(R3) ; screenshot command 1193 1193 22$: TSTB (R3) ; 1194 1194 BPL 22$ ; 1195 1195 1196 - ; получимимяскриншота1197 - mov #22,(R3) ; отдатьнашинусчитанныйблокпамятиизбуфера1198 -121$: tstb (R3) ; проверяемрезультатвыполнения1199 - bpl 121$ ; ждем1194 + ; get the screenshot name 1195 + mov #22,(R3) ; give the read memory block from the buffer to the bus 1196 +121$: tstb (R3) ; check the result of execution 1197 + bpl 121$ ; wait 1200 1200 1201 1201 mov #BUF,R1 1202 - mov #256.,R2 ; читаем256.слов;первоеслово-результатчтения1203 -122$: mov (R4),(R1)+ ; читаемблоксловвпамять1200 + mov #256.,R2 ; read 256. words; the first word is the result of reading 1201 +122$: mov (R4),(R1)+ ; read a block of words into memory 1204 1204 sob R2,122$ 1205 1205 1206 1206 .PRINT #RESOK 1207 1207 .Print #BUF 1208 1208 1209 - mov #110,@#AZ$CSR; включаемсетьпо-умолчаниюсетьдолжнабытьпостоянновключена1207 + mov #110,@#AZ$CSR; enable the network by default, the network should be constantly enabled 1210 1210 .Exit 1211 1211 {{/code}} 1212 1212 1213 - Дляраспаковкискриншотаможноиспользоватьвотэтуутилиту1211 +To unpack a screenshot, you can use this utility - 1214 1214 1215 1215 1216 1216