Спасибо тов. Линкольну за наш выходной

20 views
Skip to first unread message

Leo B.

unread,
Jun 19, 2026, 6:15:06 PM (6 days ago) Jun 19
to БЭСМ-6
Проект выходного дня Juneteen - с помощью ИИ, наконец, слить  https://github.com/besm6/simh , в котором уже много лет томится недоделанный симулятор СВС, с вышестоящим репозиторием - успешно завершён за смешное время. 

Было: This branch is 68 commits ahead of and 913 commits behind simh/simh:master.
Стало: This branch is 58 commits ahead of simh/simh:master.

Перед этим ИИ (Клод Опус 4.8) был напущен на исходники Диспака СВС с наказом разобраться с ПВВ.
В чём-то он там разобрался, но не до конца. 

На гитхаб выкладывать, наверное, пока рано, но вот что (см. приложение) Опус может понять через 20-30 минут, будучи снабжен описанием системы команд и натравлен на 115К строк ассемблерного кода.

Характерный пример:

### 4.2 Simple synchronous mode (implement this first)
Routine **`ЗАПУСК`** ("ПУСК С ОЖИДАНИЕМ КОНЦА", `адап.bemsh:3547`):

```
ЗППР БАКПВВ        ; write the 2-word command block (БАКПВВ) describing one op
ВТБРЗ
СЧ ЕПВВ            ; ACC := ПВВ processor mask (bit 46)
РЕГ ’50’           ; DOORBELL: inter-processor interrupt to ПВВ
УИА -100(НСВС)
ЖДУКОН: РЕГ ’140’  ; gash СКП
        СЧПР БАКПВВ ; read back command block (physical read, opcode 033)
        ПО ВЫХМКФ  ;   -> exit when ПВВ has marked it done
        ЖДИ        ; delay
        ЦИКЛ ЖДУКОН(НСВС)  ; spin up to 100 times
```

Такие дела. Теперь дело за малым: построить стартовый скрипт (как-то всунуть ВЫЗСВС в память, передать на него управление) и сказать Клоду отладить это безобразие по собственным же заметкам.

Для ускорения процесса если кто помнит, как СВСу говорили, что с ПВВ нужно работать в синхронном режиме, пожалуйста, скажите. 

Leo
ПВВ.md

Michael Yaroslavtsev

unread,
Jun 20, 2026, 8:04:43 PM (5 days ago) Jun 20
to be...@googlegroups.com
Сколько я помню, это была макро переменная. Могу ошибаться, конечно.

Thanks,
-- Michael

--
Данное сообщение отправлено Вам, как участнику группы "БЭСМ-6":
http://groups.google.com/group/besm6/topics
---
Вы получили это сообщение, поскольку подписаны на группу "БЭСМ-6".
Чтобы отменить подписку на эту группу и больше не получать от нее сообщения, отправьте письмо на электронный адрес besm6+un...@googlegroups.com.
Чтобы посмотреть обсуждение, перейдите по ссылке https://groups.google.com/d/msgid/besm6/39d8dd95-4b68-436a-8788-236fbcdd2c6cn%40googlegroups.com.

Leo B.

unread,
Jun 20, 2026, 8:45:32 PM (5 days ago) Jun 20
to БЭСМ-6
On Saturday, June 20, 2026 at 5:04:43 PM UTC-7 BOPOHOK wrote:
Сколько я помню, это была макро переменная. Могу ошибаться, конечно.

Действительно, есть там макропеременная &ПОБ. Что такое режим ЦРВ (на ПОБР-ах), нуждается в объяснении. Я помню, что ты это когда-то рассказывал, но устно, а не письменно.
В тексте ниже все упоминаемые номера строк относятся к АДАП (и "build the real СВС program vs. a null module"  в зависимости от &BS, разумеется, тоже).

Поскольку пересобирать Диспак для СВС пока не с руки, играем тем, что раздали.  Насколько можно судить, поскольку ВЫЗСВС нуждается в АДАП, оба должны быть в памяти перед тем, как начать грузиться. 
А как они там оказываются, я не помню.

Текущее состояние кода симулятора, относящееся к ПВВ: https://github.com/besm6/simh/blob/master/SVS/svs_iom.c 

Ниже - что мне ответил Клод на вопрос о синхронном и асинхронном режимах. Видимо, для симулятора это непринципиально, ведь всегда можно исполнять их "практически мгновенно", так что список никогда не будет состоять более чем из одной заявки.

❯ How is the OS configured to use synchronous vs asynchronous mode?

  Searched for 2 patterns, read 1 file, ran 1 shell command

Good question — and the evidence points to a clear answer: the OS doesn't flip a per-request sync/async switch for disk transfers. The two paths aren't two modes of the same operation; they serve different classes of operation, and which one runs is fixed by which entry point / command the caller invokes, not by a configuration bit.

The split is by operation class, not a mode flag

Asynchronous is the only path for device data I/O. Every public data entry point — ПВВМД, ПВВМБ, ПВВМЛ, ФОРМАТ, ПВВЕС, ПВВТЕС (exported at :463) — builds an 8-word заявка, calls ФОРБВВ, and ends in ПБ ВКЛТОЧ (e.g. disk path :4208, :4484, :4644, :4695). That queues into ТОЧ and returns; completion comes back as an interrupt (ПРПВВ). There is no synchronous variant of these calls.

Synchronous БАКПВВ+ЗАПУСК is reserved for control/management commands that have no queue and must finish inline before the dispatcher continues. Every caller of ЗАПУСК (:3547, the busy-poll-БАКПВВ routine) is such a command:
- МКФ — module command function (:3510, falls straight into ЗАПУСК), reached via ВКЛМОД/ИСКМОД to load/unload OP modules (:1165);
- ППД device start (:1134→:1144);
- channel reset СБРОС КАНАЛА (КОП 'В', :2135);
- post-reset reconnection / reconfiguration (:2990–3001, using КМКФК).

So the "choice" is hard-coded in the driver by the kind of work being done. A simulator never has to guess: traffic through ТОЧ is async data; traffic through БАКПВВ via ЗАПУСК is a synchronous control command.

What is genuinely configurable

Build-time switches (the prologue macro, :1–18):
- ∧ВS (=1) — build the real СВС program vs. a null module;
- ∧ПОБ (=0) — ПОБ=1 ⇒ "РАБОТА С ПВВ В РЕЖИМЕ 'ЦРВ' (НА ПОБР-АХ)", an alternate channel-activation regime (it gates the АКТЗ activation bit in word-7 at :3761, plus :529/613/1281/2978), not a sync/async data toggle;
- ∧НИП, ∧СТ, ∧РUT — 128K integral memory, statistics collection, hardware-error traps.

Runtime processor configuration via the РКП (processor-configuration register): the УСТРКП macro (:330) does РЕГ '54' from КОНСВС | ЕПВВ, defining which physical processor is the ПВВ and which are СВС. That decides where the РЕГ '50' doorbell lands. Notably the dispatcher can send the doorbell to itself (:2821, РЕГ '50' ШЛЮ СЕБЕ ПРЕРЫВАНИЕ), so when there's no dedicated I/O processor the ПВВ code runs as an interrupt handler on a СВС CPU — but that still drives the async queue; it does not make data I/O synchronous.

Bottom line: disk data transfers are always asynchronous; the synchronous БАКПВВ/ЗАПУСК channel is an internal control path, selected by the command, not by an OS mode setting. The only real configuration knobs (∧ПОБ, the РКП) change how channels are activated and where interrupts go, not whether a given disk read is sync or async. 
Reply all
Reply to author
Forward
0 new messages