-
Notifications
You must be signed in to change notification settings - Fork 4
Minicomputers
This is a page dedicated to "Hellorld!" running on large scale systems. What exactly classifies a computer as a "minicomputer" vs. a a "mainframe" is sometimes a little blurry, but in general, we're focusing on large scale systems. Entries are in alphabetical order.
Quick links:
MERA-400 | PDP-10 | PDP-12 | SEL-810A | IBM1401 |
The MERA-400 is a 16-bit Polish minicomputer from the mid 70s. See here for more details and here for some pictures.
Below is the assembly code for a simple "HELLORLD!" written in ASSM syntax - this is the original MERA-400 assembler:
PROG*
DEV=15/14+3/10.
OU,2(DEV+16/4)
C.C.C.
C:
LW,1(HELLO)
SLZ,1.
LWT,2,0.
LOOP:
LB,2,1.
CWT,2,0.
JES,END.
EN:
OU,2(DEV+24/4)
ERR.EN.OK.
ERR:
HLT,1.
OK:
AWT,1,1.
UJS,LOOP.
END:
HLT,0.
HELLO:
TEXT*0.
"HELLORLD!".
FINPROG*
The same code for a modern emas cross-assembler looks like this (a bit more readable and with some comments):
.equ DEV 15\14 + 3\10 ; terminal is connected to port 3 on I/O channel 15
ou r2, DEV + 16\4 ; send "reset" I/O command to the terminal
.word c, c, c
c:
lw r1, hello ; load address of "HELLORLD!" string to r1
slz r1 ; shift r1 left (in preparation for byte addressing)
lwt r2, 0 ; clear r2
loop:
lb r2, r1 ; load byte at the address stored in r1 into r2
cwt r2, 0 ; is it 0?
jes end ; if it is, jump to "end"
en:
ou r2, DEV + 24\4 ; send byte stored in r2 to the terminal
.word err, en, ok
err:
hlt 1 ; if the terminal controller doesn't respond - halt
ok:
awt r1, 1 ; move pointer to the next letter
ujs loop ; loop over
end:
hlt 0 ; halt
hello:
.asciiz "HELLORLD!"
Since I don't have an operating system running on my machine, code has been cross-assembled and its hexdump has been entered manually word by word using the control panel, as shown in the video. Thus the code runs on a "naked machine", as they called it back then. :-)
Finally, this is the result of "HELLORLD!" running on MERA-400 with a MERA 7953N terminal connected:
The PDP-10 is a 36-bit mainframe class machine from 1966. Early models were fully transistorized and built using logic modules called flip-chips, making the PDP-10 is the very definition of "large-scale." The PDP-10 architecture is very similar to the preceding PDP-6, just with a slightly expanded instruction set. Later models of the PDP-10, such as the KS10, evolved to use ICs, including the venerable AM-2901 bit-slice ALU. Suzuran, over on the RTC Discord happens to have a DECSystem 2020, which is an evolution of the PDP-10 hailing from 1977 running the TOPS-20 operating system. One day sitting at the machine, they found themselves asking the most important question in programming: "Will it Hellorld!"
You bet your bottom dollar it will!
Check out this link for a video of it running!
Code:
1000 ILDB 0,1010 ; Increment the byte pointer at 1010, then use it to get nine bits in AC 0.
; Rest of the word will be zeroed. Ninth bit is "Character Pending" flag for the 8080.
1001 SKIPN 0 ; Skip if AC 0 is not zero
1002 JRST 0,DDT ; Jump to DDT's entry point. "DDT" is a symbol that DDT knows about (it goes to 774000)
1003 MOVEM 0,33 ; Move the character and flag to the console output status word in the 8080 mailbox
1004 CONO APR,12000 ; Set the processor condition bits to ring the 8080's doorbell
1005 SKIPE 33 ; Skip the next instruction if the 8080 has zeroed the console output status word.
1006 JRST 1005 ; Otherwise wait, the 8080 will zero the word when it is done printing on the CTY.
1007 JRST 1000 ; Jump back to 1000
1010 001100,,001010 ; Location 1010 has the byte pointer. It describes a string of nine-bit bytes
; starting at bit 0 of this word. Since our first operation increments this,
; the actual first character comes from bit 9 of the next word.
; Each byte has the high-order bit set, as described earlier
1011 510505,,514514 ; Next are the characters "HELL"
1012 517522,,514504 ; ..."ORLD"
1013 441415,,412407 ; ..."!", a carriage return, a line feed, and a bell
1014 000000,,000000 ; ...and more nulls than we need.
The story of this one is absolutely epic! The PDP-12 is an interesting combination of the LINC computer and the PDP-8 from 1969. The PDP-12 does have a front panel and a screen, but using that screen is no small feat. SpaceHobo over on the Discord did some pretty amazing work getting "Hellorld!" to run in an emulator, and once confident in the program, handed it off to Dr. Peterson to toggle into a real-deal running and working PDP-12! And here's where things get exciting.
When toggled in, it didn't actually work. SpaveHobo and Dr. Peterson debugged it as best they could, but there was the lingering doubt that maybe something in the real machine wasn't working right. It seems that the the AC never clears after returning from LINC mode: the AC always seems to have 0030 in it. That was weird indeed, and Vince who had been following along (who was the author of the emulator and also happens to have a real deal running and working PDP-12), decided to give the code a shot and got the same exact result! This sparked a ton of interesting conversation and deep-diving.
It turns out, it was a bug in the emulator!
To quote SpaceHobo:
"Incidentally, we found this because my friend sent me a video of him single-stepping through the code on the console in Duluth. I watched the blinkylights on my phone while having a pint down the pub here in London, and scribbled my diagnosis and (what I first thought was) a workaround on a copy of the listing. Vince tried it on his 12 in Oregon, and found that both machines behaved the same way. He had a fix in the emulator shortly after, and confirmed my "workaround" was actually a correct fix."
Y'all, do you know what this means? We're not just printing "Hellorld!" we're doing science stuff over here! This has got to be one of the coolest "Hellorld!" stories on the planet!
Full code with comments available here.
Code:
/ helrld.pa, by Nick Moffitt <[email protected]>
LINC=6141 / Instruction to switch to LINC mode
PDP=0002 / Instruction to switch back to PDP-8 mode
HORIZ=1 / LINC register 1, for horizontal position
HALFCH=2 / LINC register 2, points to each half of character
*200 / Standard starting page for instructions.
JMP HLRLD / Initial vector to cleanup at end of block.
/ AC should be clear at start,
/ but the only side-effect is a single frame
/ at the wrong y-value. It's self-correcting.
DATA, 1077; 7710 /H
4577; 4145 /E
0177; 0301 /L
0177; 0301 /L
4177; 7741 /O
4477; 3146 /R
0177; 0301 /L
4177; 3641 /D
7500; 0000 /!
DATA-1 / Pointer to our text patterns
0334 / Initial horizontal value
HLRLD, TAD HLRLD-1 / Load initial horizontal position
DCA HORIZ / and put it in LINC register 1
TAD HLRLD-2 / Get our DATA pointer
DCA HALFCH / Put it in the pattern register
PUTCH, LINC
1762 / DSC I 2
PDP
CLA / DSC leaves 0030 in AC
/ The DSC instruction pre-increments the bitmap "register"
TAD I HALFCH / Take a look at the value we printed.
SNA / If it's zero,
JMP HLRLD / then we're done. Refresh!
CLA / Otherwise reset vertical to 0
JMP PUTCH / And display it
$
There is an amazing video on the entire story at this link!
Aint nothing like getting an oil and gas pipeline mini-computer from the 60s to print "Hellorld!" which is exactly what SomeComputerGuy did, and it's every bit as glorious as it sounds! Not only that, he got it to literally print using an ASR33 teletype as the terminal! The SEL810A is a beautiful "little" minicomputer that's actually built using discrete transistor cards that plug into wire-wrapped backplanes. The machine is surprisingly reliable for creeping up on 70 years old, and it's an absolute work of art inside!
Here's a video of this very SEL810A running Lunar Lander
Code:
The IBM 1401 is a very interesting computer from my point of view (but I think we all say that about our favorite machines)
Some trivia from Wikipedia (https://en.wikipedia.org/wiki/IBM_1401) The IBM 1401 is a variable-wordlength decimal computer that was announced by IBM on October 5, 1959. The first member of the highly successful IBM 1400 series, it was aimed at replacing unit record equipment for processing data stored on punched cards and at providing peripheral services for larger computers. The 1401 is considered by IBM to be the Ford Model-T of the computer industry due to its mass appeal. Over 12,000 units were produced and many were leased or resold after they were replaced with newer technology. The 1401 was withdrawn on February 8, 1971.
There are only two knwon working IBM 1401 as of now, both owned by the Computer History Museum (CHM) in Mountain View, California (https://computerhistory.org/) and unfortenautly that's not me nor is it anywhere near where I live in Germany. So I can't demonstrate the code on a real IBM 1401 - I hope that it still counts when I show it running in the really fantastic "virtual data center" from Rolffson (https://rolffson.de/).
There was no operating system, no bootloader, nothing like that. The 1401 has no console per default, all output was done via the 1403 line printer. Later the IBM 1407 inquiry station came up which in fact was a typewriter.
Still no OS existed to use the 1407. Application programs had to make use of the 1407. It was dead slow and blocked the CPU while waiting for data entry or typing.
All the logic was hardwired, unlike the later 360 models which used microcode and hardware abstraction.
The computer loaded programs directly from punched cards and tape drives.
The 1401 loads the code into memory from postition 1 to 80, set a so called WORDMARK (WM) at position 1 and execute the code starting at position 1 Every command (op code) had to be trailored by a WM to mark the end of the op code and the beginning of the next one.
The HELORLD! here would be punched onto a card, put that into the reader bin of the 1402 reader-punch and executed by pushing the "LOAD" button on the 1402.
,008015,022029,036042,050054,055062,063065,066075/332/M0742102F1.HELLORLD!
Code with memory positions and comments:
Pos Op code Remark
0001 ,008015 ; set WM at pos 8 and 15
0008 ,022029 ; set WM at pos 22 and 29
0015 ,036043 ; set WM at pos 36 and 43
0022 ,050054 ; set WM at pos 50 and 54
0029 ,055062 ; set WM at pos 55 and 62
0036 ,063065 ; set WM at pos 63 and 65
0044 ,066075 ; set WM at pos 66 and 75
; pos 201 to 332 containes the memory of the 132 printing positions of the current line
0050 /332 ; clear memory from pos 332 down to 300
0054 / ; clear memory from pos 299 down to 200
; without address, the / op code clears the next 100 positions of memory
; starting where the last command left the B adress register
0055 M074210 ; move memory from pos 74 to 210 (from right to left until a WM is found
0062 2 ; print out the current line
0063 F1 ; Eject page
0065 . ; HALT CPU
0066 HELLORLD! ; Text to be printed
Same output, but written in AUTOCODER, an assembler for the 1401
JOB HELLORLD.S 05/18/24 20:03:01 -5381
CTL 6611
ORG 333
START CS 332
CS
MCW @HELLORLD@,210
W
CC 1
H
END START