Last modified by Max on 2025/03/02 15:18

From version 2.70
edited by Max
on 2025/02/25 16:52
Change comment: (Autosaved)
To version 2.77
edited by Max
on 2025/02/25 17:22
Change comment: (Autosaved)

Summary

Details

Page properties
Content
... ... @@ -1148,194 +1148,195 @@
1148 1148  SCR_VGA_CONF = SCR_MEM_CONF+44. ; here video controller configuration - 10 words
1149 1149  SCR_PAL = SCR_VGA_CONF+20. ; here 338. values (words) of palette 338 words
1150 1150  ;--------------------------------------------------
1151 + mov @#177326,R5 ; save page 130k which was before the call
1152 + mov #76,@#177336 ; hook the 76th page into the window
1151 1151  
1152 - mov @#177326,R5 ; сохраним страницу 130k которая была до вызова
1153 - mov #76,@#177336 ; цепляем 76ую страницу в окно
1154 -
1155 - ;конфигурация видеоконтроллера
1154 + ;video controller configuration
1156 1156   ; 177230-177256
1157 1157   mov #SVGAC,R4
1158 1158  
1159 - mov @#177230,(R4)+;177230 - регистр управления
1160 - mov @#177232,(R4)+;177232 - регистр - верхняя страница (слой 0)
1161 - mov @#177240,(R4)+;177240 - регистр - средняя страница (слой 1)
1162 - mov @#177242,(R4)+;177242 - регистр - нижняя страница (слой 2)
1163 - mov @#177244,(R4)+;177244 - регистр вертикального скролинга слой 2
1164 - mov @#177246,(R4)+;177246 - регистр вертикального скролинга слой 1
1165 - mov @#177250,(R4)+;177250 - регистр вертикального скролинга слой 0
1166 - mov @#177252,(R4)+;177252 - регистр гозизонтального скролинга слой 0
1167 - mov @#177254,(R4)+;177254 - регистр гозизонтального скролинга слой 1
1168 - mov @#177256,(R4)+;177256 - регистр гозизонтального скролинга слой 2
1158 + 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
1169 1169  
1170 - mov R5,@#177336; вернем страницу с которой был вызов
1169 + mov R5,@#177336; return the page from which the call was made
1171 1171  
1172 1172  
1173 1173   ;-------------------------
1174 - MOV #AZ$CSR,R3 ; Готовим CSR контроллера
1175 - MOV #AZ$DR,R4 ; Готовим DR контроллера
1176 -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
1177 1177   TSTB (R3)
1178 1178   BPL 20$
1179 1179  
1180 - ; очистим блок памяти для имени - дабы система сделала дефолтное имя файла
1181 - mov #23,(R3) ; командуем что будем писать данные в буфер
1182 -128$: TSTB (R3) ; проверяем результат выполнения
1183 - 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
1184 1184   clr R1
1185 1185  
1186 1186   mov #256.,R2 ;
1187 -129$: mov R1,(R4) ; отдаем в контроллер
1186 +129$: mov R1,(R4) ; give to the controller
1188 1188   sob R2,129$
1189 1189  
1190 1190  
1191 - MOV #044,(R3) ; команда скриншот
1190 + MOV #044,(R3) ; screenshot command
1192 1192  22$: TSTB (R3) ;
1193 1193   BPL 22$ ;
1194 1194  
1195 - ; получим имя скриншота
1196 - mov #22,(R3) ; отдать на шину считанный блок памяти из буфера
1197 -121$: tstb (R3) ; проверяем результат выполнения
1198 - 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
1199 1199  
1200 1200   mov #BUF,R1
1201 - mov #256.,R2 ; читаем 256. слов; первое слово - результат чтения
1202 -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
1203 1203   sob R2,122$
1204 1204  
1205 1205   .PRINT #RESOK
1206 1206   .Print #BUF
1207 1207  
1208 - mov #110,@#AZ$CSR; включаем сеть по-умолчанию сеть должна быть постоянно включена
1207 + mov #110,@#AZ$CSR; enable the network by default, the network should be constantly enabled
1209 1209   .Exit
1210 1210  {{/code}}
1211 1211  
1212 -Для распаковки скриншота можно использовать вот эту утилиту
1211 +To unpack a screenshot, you can use this utility - [[https:~~/~~/master.pdp-11.ru/screen_unpack/>>https://master.pdp-11.ru/screen_unpack/]]
1213 1213  
1214 1214  
1215 1215  
1216 -= **Команды для работы со стеком TCP/IP** =
1215 += Commands for working with the TCP/IP stack =
1217 1217  
1218 -следующие команды работают с буфером информации TCP/IP cтека.
1217 +The following commands operate on the TCP/IP stack information buffer.
1219 1219  
1220 -== **040: Получить ip адрес и прочие настройки стека TCP/IP в буфер** ==
1219 +== 040: Get IP address and other TCP/IP stack settings to buffer ==
1221 1221  
1222 -Код команды 040,  данная команда заполняет буфер информацией с TCP/IP cтека текущей (фактической) информацией.
1221 +Command code 040, this command fills the buffer with information from the TCP/IP stack with current (actual) information.
1223 1223  
1224 -== **041: Чтение буфера ip адреса** ==
1223 +== 041: Reading ip address buffer ==
1225 1225  
1226 -Код команды 041,  данная команда передает буфер на шину
1225 +Command code 041, this command transfers the buffer to the bus
1227 1227  
1228 -эта пара команд позволяет получить текущую информацию со стека
1227 +This pair of commands allows you to get current information from the stack
1229 1229  
1230 -* IP адрес
1231 -* MASK маску
1232 -* GW гейтвей
1233 -* NTP адрес NTP-сервера
1234 -* DNS1 адрес основного DNS
1235 -* DNS2 адрес резервного DNS
1229 +* IP address
1230 +* MASK mask
1231 +* GW gateway
1232 +* NTP address of the NTP server
1233 +* DNS1 primary DNS address
1234 +* DNS2 backup DNS address
1236 1236  
1237 -соответственно это 12 слов
1236 +accordingly it is 12 words
1238 1238  
1239 -Пример программы:
1238 +Example program:
1240 1240  
1241 1241  {{code language="assembler"}}
1242 -; trap 52 - чтение блока IP адресов в блок памяти IPADDDBLOCK (8. ячеек)
1243 -; результат в R3 =0 error, иначе адрес куда считано (IPADDDBLOCK)
1244 -GetIPaddrs: push R1
1245 - push R2
1246 - call AZreset; сбросим
1247 - tst R1
1248 - bne 0ERR$
1249 - MOV #AZ$CSR,R1
1250 - mov #40,(R1)
1251 -0$: TSTB (R1); прочитать адреса в свою память
1252 - BPL 0$; ждем
1253 - mov #41,(R1)
1254 -1$: TSTB (R1); подготовить буфер
1255 - BPL 1$; ждем
1256 - TST (R1)+; инкрементируем
1257 - mov #IPADDDBLOCK,R3
1258 - mov #12.,R2
1259 -2$: mov (R1),(R3)+; читаем блок слов в память
1260 - sob R2,2$
1261 - mov #IPADDDBLOCK,R3; успешно
1262 - br 0END$
1263 -0ERR$: CLR R3
1264 -0END$: pop R2
1265 - pop R1
1266 - return
1241 +; trap 52 - reading a block of IP addresses into the IPADDDBLOCK memory block (8 cells)
1242 +; result in R3 = 0 if error, otherwise the address where it was read (IPADDDBLOCK)
1243 +GetIPaddrs: push R1
1244 + push R2
1245 + call AZreset; reset
1246 + tst R1
1247 + bne 0ERR$
1248 + MOV #AZ$CSR,R1
1249 + mov #40,(R1)
1250 +0$: TSTB (R1); read addresses into its memory
1251 + BPL 0$; wait
1252 + mov #41,(R1)
1253 +1$: TSTB (R1); prepare buffer
1254 + BPL 1$; wait
1255 + TST (R1)+; increment
1256 + mov #IPADDDBLOCK,R3
1257 + mov #12.,R2
1258 +2$: mov (R1),(R3)+; read block of words into memory
1259 + sob R2,2$
1260 + mov #IPADDDBLOCK,R3; success
1261 + br 0END$
1262 +0ERR$: CLR R3
1263 +0END$: pop R2
1264 + pop R1
1265 + return
1266 +
1267 1267  {{/code}}
1268 1268  
1269 -Пример данных
1269 +Example return data:
1270 1270  
1271 1271  {{info}}
1272 -Примеры данных - возвращаемые слова в восьмеричном формате
1273 -124300 116400 - IP адрес 192.168.0.157
1274 -177777 000377 - MASK маску 255.255.255.0
1275 -124300 000400 - GW гейтвей 192.168.0.1
1276 -124300 000400 - NTP адрес NTP-сервера 192.168.0.1
1277 -124300 050000 - DNS1 адрес основного DNS 192.168.0.90
1278 -124300 055000 - DNS2 адрес резервного DNS 192.168.0.80
1272 +Data examples - words returned in octal format
1273 +124300 116400 - IP address 192.168.0.157
1274 +177777 000377 - MASK mask 255.255.255.0
1275 +124300 000400 - GW gateway 192.168.0.1
1276 +124300 000400 - NTP address of NTP server 192.168.0.1
1277 +124300 050000 - DNS1 address of primary DNS 192.168.0.90
1278 +124300 055000 - DNS2 address of backup DNS 192.168.0.80
1279 1279  {{/info}}
1280 1280  
1281 -== **043: чтение MAC-адреса в ip буфер** ==
1281 +== 043: Read MAC address into ip buffer ==
1282 1282  
1283 -Код команды 043, данная команда читает текущий фактический MAC адрес в буфер IP адресов
1284 -те сначала 043, а затем 041 команды
1283 +Command code 043, this command reads the current actual MAC address into the IP address buffer i.e. first 043 and then 041 commands
1285 1285  
1286 -Пример программы:
1285 +Example program:
1287 1287  
1288 1288  {{code language="assembler"}}
1289 -; trap 72 - чтение MAC адреса в блок памяти IPADDDBLOCK (12. ячеек)
1290 -; результат в R3 =0 error, иначе адрес куда считано (IPADDDBLOCK)
1291 -GetMACaddrs: push R1
1292 - push R2
1293 - call AZreset ; сбросим
1294 - tst R1
1295 - bne 0ERR$
1296 - MOV #AZ$CSR,R1
1297 - mov #43,(R1)
1298 -0$: TSTB (R1) ; прочитать адреса в свою память
1299 - BPL 0$ ; ждем
1300 - mov #41,(R1)
1301 -1$: TSTB (R1) ; подготовить буфер
1302 - BPL 1$ ; ждем
1303 - TST (R1)+ ; инкрементируем
1304 - mov #IPADDDBLOCK,R3
1305 - mov #12.,R2
1306 -2$: mov (R1),(R3)+ ; читаем блок слов в память
1307 - sob R2,2$
1308 - mov #IPADDDBLOCK,R3; успешно
1309 - br 0END$
1310 -0ERR$: CLR R3
1311 -0END$: pop R2
1312 - pop R1
1313 - retur
1288 +; trap 72 - reading the MAC address into the IPADDDBLOCK memory block (12 cells)
1289 +; result in R3 = 0 if error, otherwise the address where it was read (IPADDDBLOCK)
1290 +GetMACaddrs: push R1
1291 + push R2
1292 + call AZreset ; reset
1293 + tst R1
1294 + bne 0ERR$
1295 + MOV #AZ$CSR,R1
1296 + mov #43,(R1)
1297 +0$: TSTB (R1) ; read addresses into its memory
1298 + BPL 0$ ; wait
1299 + mov #41,(R1)
1300 +1$: TSTB (R1) ; prepare buffer
1301 + BPL 1$ ; wait
1302 + TST (R1)+ ; increment
1303 + mov #IPADDDBLOCK,R3
1304 + mov #12.,R2
1305 +2$: mov (R1),(R3)+ ; read block of words into memory
1306 + sob R2,2$
1307 + mov #IPADDDBLOCK,R3; success
1308 + br 0END$
1309 +0ERR$: CLR R3
1310 +0END$: pop R2
1311 + pop R1
1312 + retur
1313 +
1314 1314  {{/code}}
1315 1315  
1316 1316  
1317 1317  
1318 -= **Команды для работы с MicroSD картой на файловом уровне** =
1318 += Commands for working with a MicroSD card at the file level =
1319 1319  
1320 1320  
1321 -Данные команды предназначены для работы с MicroSD картой на уровне файловой системы и позволяет читать/писать файлы без монтирования файлов как образов дисков.
1321 +These commands are designed to work with a MicroSD card at the file system level and allow you to read/write files without mounting files as disk images.
1322 1322  
1323 -Эти команды используют буфер 256. слов который задействован в интерфейсе работы с энергонезависимой памятью (см выше команды 022 023)
1324 -\\Ограничения - длина полного пути к файлу  256 байт
1323 +These commands use a 256-word buffer that is used in the interface for working with non-volatile memory (see commands 022 023 above)
1325 1325  
1326 -== **050: Установить имя файла который будем читать** ==
1325 +Limitations - the length of the full path to the file is 256 bytes
1327 1327  
1328 -Код команды 050 данная команда устанавливает имя файла который будем читать, при этом производится открытие файла на чтение, а также получение его свойств.
1327 +== 050: Set the name of the file we will read ==
1329 1329  
1330 -== **051: Получить размер файла на чтение (или его статус) на МПИ** ==
1329 +Command code 050, this command sets the name of the file that we will read, while opening the file for reading, and also obtaining its properties.
1331 1331  
1332 -Код команды 051 данная команда передает на МПИ размер файла или ошибку его чтения. Размер файла 31бит, старший бит является признаком ошибки. Соответственно максимальный размер файлов с которыми можно работать через этот интерфейс ограничен 2^31 байт (2GB).
1331 +== 051: Get file size for reading (or its status) on BUS ==
1333 1333  
1334 -формирование ошибки выглядит так:
1335 -sizeanyfile=1<<31 + FFres; ~/~/ если установлен старший бит 32х битного слова - то в младшей части код ошибки
1336 -\\FFres = ошибка FatFS
1337 -
1333 +Command code 051, this command transmits the file size or reading error to the MPI. The file size is 31 bits, the most significant bit is an error indicator. Accordingly, the maximum file size that can be worked with via this interface is limited to 2 ^ 31 bytes (2GB).
1338 1338  
1335 +The error generation looks like this:
1336 +sizeanyfile=1<<31 + FFres; ~/~/ if the most significant bit of a 32-bit word is set, then the error code is in the lower part
1337 +
1338 +FFres = FatFS error
1339 +
1339 1339  {{code language="c"}}
1340 1340  typedef enum {
1341 1341   FR_OK = 0, /* (0) Succeeded */
... ... @@ -1363,23 +1363,22 @@
1363 1363  
1364 1364  [[http:~~/~~/elm-chan.org/fsw/ff/doc/open.html>>url:http://elm-chan.org/fsw/ff/doc/open.html]]
1365 1365  
1366 -== **052: Читать блок установленного файла в буфер** ==
1367 +== 052: Read a block of a set file into a buffer ==
1367 1367  
1368 -Код команды 052,  данная команда осуществляет чтение файла в буфер энергонезависимой памяти.
1369 +Command code 052, this command reads a file into a non-volatile memory buffer.
1369 1369  
1370 -В итоге схема чтения файла выглядит вот так
1371 -**023** - заливаем имя файла в буфер
1372 -**050** - устанавливаем файл на чтение
1373 -**051 **- читаем длину файла или ошибку открытия файла
1374 -если ошибка - повторяем сначала 023 050 051
1375 -если все ok - приступаем к чтению файла
1376 -**052** - читает блок файла в буфер
1377 -**022 **- забираем данные из буфера
1378 -пары 052 022 повторяем нужное количество раз дабы считать весь файл
1379 -как файл будет прочтен - последняя 052 команда закроет его автоматически.
1380 -
1371 +As a result, the file reading scheme looks like this
1372 +**023** - fill the file name into the buffer
1373 +**050 **- set the file for reading
1374 +**051** - read the file length or file open error
1375 +if there is an error - repeat 023 050 051 from the beginning
1376 +if everything is ok - start reading the file
1377 +**052** - read the file block into the buffer
1378 +**022** - take data from the buffer
1379 +repeat the **052 022** pairs the required number of times in order to read the entire file
1380 +once the file is read - the last 052 command will close it automatically.
1381 1381  
1382 -Пример программы
1382 +Example program:
1383 1383  
1384 1384  {{code language="assembler"}}
1385 1385  
... ... @@ -1500,7 +1500,7 @@
1500 1500  как файл будет записан - последняя 055 команда закроет его автоматически
1501 1501  
1502 1502  
1503 -Пример программы:
1503 +Example program:
1504 1504  
1505 1505  {{code language="assembler"}}
1506 1506  ; заливаем в буфер имя файла