vak: (Житель планеты Узм)
Вот где крутой ретрокомпьютинг! Чувак купил последнюю модель VAX и запустил NetBSD. Процессор 1994 года на частоте 110 МГц, память 64 мегабайта.
I bought a VAX! As far as I know, it's actually the fastest VAX ever produced, the 4000-705A (before the Alpha, anyway). It uses the KA694 NMAX++ CPU, and I've ordered the maximum 4x128MB memory config to add to it.

I spent the week waiting for it to arrive working in a VAX simulator (OpenSIM), learning NetBSD, getting it all configured, and so on. And when the VAX arrived, I was able to plug in an Emulex UC07 QBus SCSI card, plug a ZULUSCSI into that, plug an SD card into that, and mount the image I had been preparing all week.

And it booted!

I don't want to hurt any feelings amongst the DEC alumni, so I left the factory DSSI drive set up to boot OpenVMS. But it's just a node that's trying to join a non-existent cluster, sadly. Which is just as well, because I never learned VMS 📷

I want the machine to be able to "do something", and so I wanted to get it running my LED driver software that controls all of my LED effects via wifi. The only catch is it's written in C++20, and compiling it on the VAX would take almost a half gig of memory, and I only have 64MB right now.

So, I installed NetBSD on an Epyc, built the VAX cross-compiler, compiled the code on the Epyc, then scp'd the object files to the VAX, where I linked the binary. And it's now running my LEDs! At 100% cpu usage, mind you




vak: (Default)
Один крутой чувак раздобыл дистрибутив эпловской Rhapsody OS для x86 и сумел запустить на современном (с натяжкой) железе.

Напомню историю, кто не в курсе. Стив Джобс ушёл из Эппл в 1985 году и основал стартап NeXT. В 1996 Эппл приобрела компанию NeXT, выкинула свой дремучий Classic MacOS 7 и заменила на операционку NeXTSTEP, переименовав в Rhapsody. С 1999-го она вышла под именем Mac OS X Server 1.0, а позже превратилась в современный MacOS.

Если вы посмотрите на вызовы графического интерфейса MacOS: NSWindow, NSView, NSFileManager, NSString - они не случайно начинаются с "NS". Это историческое наследие NeXTSTEP, где всё это добро было придумано.

vak: (Default)
Редкая историческая книжечка приехала.



Это 1979 год, тематическая подборка статей из журнала BYTE, включая кучу нетривиальных исходников того времени. Почитать онлайн можно здесь: https://archive.org/details/the-byte-book-of-pascal/page/n3/mode/2up

К примеру, реализация языка APL на Паскале.



Или вот весь интерпретатор P-кода на одной странице.

vak: (Знайка)
Пост в группе PDP-11 на фейсбуке: facebook.com/groups/dec.pdp.11/posts/10163012987613979/

Инструкции по сборке симулятора SIMH и установке операционной системы OpenVMS: openvmshobby.com/vax-vms/openvms-on-vax-simh/



vak: (бэсм-6)
ИИ научился создавать качественную техническую документацию. Вот вам к примеру про наш со [personal profile] spamsink  проект Алгола-60 для машины Electrologica X1.

deepwiki.com/sergev/x1-algol-compiler
vak: (Default)
https://photos.app.goo.gl/DNCnJzSRXYbQGtCp9

Прекрасные фотки IBM Selectric I/O (Model 73). Обратите внимание на печатающую головку, знаменитый "golf ball".

vak: (Daemon)
Хотите глянуть, чем занимался молодой Деннис Ритчи до того, как Кен Томпсон увлёк его игрой в Space Travel на PDP-7?

Статья Альберта Мейера и Денниса Ритчи "The complexity of loop programs" (PDF)

А сама игра вот тут: github.com/mohd-akram/st
vak: (бэсм-6)
The CDC 1604, developed by Control Data Corporation, was a significant computer in the early 1960s, widely used for scientific computing. Regarding whether the CDC 1604 was supplied with the source code for its Fortran compiler, the available evidence and historical context suggest the following:

1. Standard Practice for CDC Fortran Compilers:

  • Control Data Corporation typically provided Fortran compilers for its systems, including the CDC 1604, as Fortran was a dominant programming language for scientific applications at the time. The CDC 1604 supported a Fortran compiler, often based on or derived from the original Fortran II or Fortran IV standards, tailored to the CDC 1604’s 48-bit architecture.

2. Source Code Availability:

  • In the early 1960s, it was common for computer manufacturers like CDC to supply source code for system software, including compilers, to customers, especially for scientific institutions like the Joint Institute for Nuclear Research (JINR) in Dubna. This was because:
    • Customers often needed to modify or optimize compilers for specific applications or hardware configurations.
    • Academic and research institutions, such as JINR, frequently had skilled programmers capable of adapting software.
    • The open nature of early computing encouraged sharing of source code to facilitate customization.
  • While direct documentation confirming the inclusion of Fortran source code with the CDC 1604 at JINR is scarce, CDC’s general practice and the needs of research institutions strongly suggest that the Fortran compiler’s source code was likely provided or available upon request. This would have enabled JINR’s programmers, under leaders like Nikolay Govorun, to adapt the compiler for their heterogeneous computing environment.

3. JINR’s Context and Govorun’s Work:

  • At JINR, Nikolay Govorun and his team were actively involved in developing and adapting software for various systems, including the CDC 1604A. Their work included creating Fortran translators (e.g., for the BESM-6) and adopting international standards like CERN’s Fortran software. This implies that JINR had access to or could modify the Fortran compiler for the CDC 1604, which would be feasible if source code was supplied or if they reverse-engineered or reimplemented parts of it.
  • A 1986 JINR document mentions the use of CDC 1604A and CDC 6500 systems for data processing, indicating significant software customization. Access to the Fortran compiler’s source code would have been critical for integrating these systems into JINR’s computing complex.

4. Historical Precedent:

  • Other institutions using CDC systems, such as universities or government labs in the U.S., often received source code for system software. For example, the University of Wisconsin’s CDC 1604 users contributed to software development, suggesting source code availability. Given JINR’s status as a prestigious international research center, it’s plausible that CDC provided similar access to facilitate scientific collaboration, even across Cold War divides.

5. Caveats:

  • Exact contractual details of the CDC 1604’s delivery to JINR (around 1963–1965) are not publicly documented, and export restrictions during the Cold War may have influenced what was supplied. However, scientific exchanges and JINR’s international status likely mitigated such barriers, allowing for the inclusion of necessary software and documentation.
  • If the source code was not provided, JINR’s skilled programmers could have developed their own Fortran compiler or adapted existing ones, as they did for other systems.

Conclusion:

While definitive evidence is lacking, it is highly likely that the CDC 1604 supplied to JINR in Dubna included the source code for its Fortran compiler, consistent with CDC’s practices and the needs of scientific institutions in the 1960s. JINR’s ability to customize software for the CDC 1604A, under Nikolay Govorun’s leadership, further supports this conclusion, as such customization typically required access to source code. If the source code was not provided, JINR’s team was capable of developing or adapting a Fortran compiler to meet their needs.
vak: (бэсм-6)
Недавно в Дубне отмечали юбилей Николая Говоруна, инициатора создания первого компилятора Фортрана для БЭСМ-6.

"Nikolay Govorun is a phenomenon in science"

"In 1965, during a business trip to CERN, Govorun learnt about the computer centre, as well as about libraries and application packages in the Fortran language that were widely used to process experimental data. In the USSR during these years, the ALGOL programming language was widely developed, so Govorun's proposal to develop software in the Fortran language was not supported."

"In 1966 [...] the BESM-6 computer, the most high-performance computer in Europe appeared, yet it was not equipped with advanced programming systems. Afterwards, N.N.Govorun gathered a team of specialists from different institutes to develop the first in the USSR Fortran language translator for BESM-6 computer, adaptation of libraries and application software packages for experimental data processing. The result of this work was the popular and widespread Dubna monitor system. The next step was the development of the Dubna operating system for BESM-6 that made JINR famous."
vak: (бэсм-6)
Если поставить задачу сбацать эмулятор ретро дисплея, какие шрифты можно бы применить? Я навскидку нагуглил три варианта.
Шрифт DEC Terminal смотрится неплохо, но файл TTF кривой. Без починки не заработает.



Flexi IBM VGA тоже симпатичный, однако больше в стиле писишек.

vak: (Default)
Не то чтобы совсем новая: 1980 года издания, но в идеальном состоянии. Книжка рассказывает про все кодировки символов 50-х, 60-х и 70-х годов. Почему делалось так или иначе, какие были варианты, как проблемы изменялись с появление новых компьютерных технологий. Автор был активным участником комитета по стандартизации ANSI/X3L2. Эту книжку можно свободно читать в интернете, но держать в руках совсем другое удовольствие. 😀



Здесь не только кодировки для принтеров, но и для перфокарт и перфолент.

vak: (Default)
Много интересных подробностей про исторический компилятор Би для PDP-7 и про первый юникс.

vak: (Default)
Простая программа: копирует входные байты на выход.
main() {
auto ch;

while (ch = read()) {
write(ch);
}
}
Пропускаем через Би компилятор, получаем ассемблерный код.
$ bbesm < cat.b > cat.madlen
$ cat cat.madlen
main:8,name,
program:,entry,
main:,bss,
b/save0:,subp,
b/ret:,subp,
,its,13
,call,b/save0
15,utm,1
/0:,bss,
7,utc,0
14,vtm,
,ita,14
read:,subp,
14,vtm,read
,its,14
,ati,14
14,utc,
13,vjm,
15,wtc,
,atx,
,uza,/1
write:,subp,
14,vtm,write
,ita,14
7,utc,0
14,vtm,
,its,14
,ati,14
14,xta,
14,vtm,-1
15,wtc,
13,vjm,
,uj,/0
/1:,bss,
,uj, b/ret
,end,
Компилируем в бинарник для БЭСМ-6. Линкуем с рантайм библиотекой Би.
$ besmc cat.madlen libb.obj
Запустим и подадим на вход собственный исходный код:
$ ./cat.exe < cat.b 
MAIN() [
AUTO CH;

WHILE (CH = READ()) [
WRITE(CH);
]
]
Всё перекодировалось в КОИ-7 по ходу. Это специфика мониторной системы Дубна, никуда не денешься. Ведь мы используем её механизм формирования входного потока программы.
vak: (Default)
Компилятор Би для БЭСМ-6 функционально закончен. То есть все фичи, в нём имеющиеся, вроде работают. Некоторые привычные для нас вещи отсутствуют: инкремент-декремент, сдвиги, операторы типа плюс-присвоить. Нет цикла for и оператора switch. Не поместились они у Кена Томпсона в 16 килобайт памяти PDP-7.

Сгенерённый компилятором код получается неэффективный, но для нас сейчас главное, что он функционально правильный. А насколько он неэффективный - давайте померяем. Возьмём для теста известный алгоритм вычисления e-2 по формуле 1/2! + 1/3! и так далее. Вот реализация на Би: e-2.b. Компилируем, запускаем:
$ bbesm < e-2.b > e-2.madlen
$ besmc e-2.madlen libb.obj
$ time ./e-2.exe
71828 18284 59045 23536 02874 71352 66249 77572 47093 69995
...
88683 31483 28027 06553 83300 46932 90115 74414 75631 39997

real 0m18.310s
user 0m18.302s
sys 0m0.008s
Для сравнения я переписал этот код на Паскаль: e-2.dub. Запустим на том же симуляторе:
$ dubna e-2.dub
...

71828 18284 59045 23536 02874 71352 66249 77572 47093 69995
...
88683 31483 28027 06553 83300 46932 90115 74414 75631 39997
------------------------------------------------------------
Elapsed time: 12.3 seconds
Simulated: 626677681 instructions
Simulation rate: 51010913 instructions/sec
Выходит 18.3 секунды против 12.3 секунды на Паскале. Не так ужасно, всего в полтора раза медленнее. С оптимизацией Би может оказаться даже эффективнее Паскаля.
vak: (Default)
Компилятор Би для БЭСМ-6 маленько подрос и уже способен правильно сгенерить функцию printf(). Вот как она выглядела в районе 1969 года.
printf(fmt, args) {
auto ap, a, c, i, n;

i = 0;
ap = &args;
loop:
while ((c = char(fmt, i)) != '%') {
if (c == '*0')
return;
writeb(c);
i = i + 1;
}
i = i + 1;
c = char(fmt, i);
if (c == '%') {
writeb('%');
i = i + 1;
goto loop;
}
a = *ap;
if (c == 'd') {
printd(a);
} else if (c == 'o') {
printo(a);
} else if (c == 'c') {
write(a);
} else if (c == 's') {
n = 0;
while ((c = char(a, n)) != '*0') {
writeb(c);
n = n + 1;
}
} else {
/* bad format specification, ignore */
goto loop;
}
i = i + 1;
ap = ap + 1;
goto loop;
}
Напишем тест, задействуя все форматы.
main() {
printf("Hello, World!*n");
printf("%% %% %%%%*n");
printf("format %%d: %d %d*n", 123, -123);
printf("format %%o: %o %o*n", 234, -234);
printf("format %%c: %c %c*n", 'foo', 'bar');
printf("format %%s: *"%s*" *"%s*"*n", "Hello", "World");
}
Компилируем, запускаем.
$ bbesm < test.b > test.assem 
$ besmc test.assem libb.obj
$ ./test.exe
Hello, World!
% % %%
format %d: 123 -123
format %o: 352 -352
format %c: foo bar
format %s: "Hello" "World"
Фунциклирует в лучшем виде однако.
vak: (Default)
Собрал компилятор GCC для PDP-10 по инструкции: http://pdp10.nocrew.org/netbsd/build-gcc.txt

Исходник скачивается по ссылке: http://pdp10.nocrew.org/gcc/download/gcc-pdp10-20030606.tar.bz2

Пришлось маленько подрихтовать, чтобы собиралось на современном линуксе. Пропущен третий параметр (mode) в вызове open(). Есть пример автономной программы на Си: http://pdp10.nocrew.org/netbsd/boot.c

При её компиляции получается ассемблерный код: Не так интересна сама PDP-10, как факт наличия компилятора Си для словной архитектуры (без байтовой адресации) с размером слова 36 бит. Значит и для БЭСМ-6 можно переделать. Чем слово 48 бит хуже?