@HoffmanLabs I've worked on IBM assembler but never really on vax and always with integers.
If code says (float) C = (int) A / (float) B, then at sone point before division, A gets converted to float, right?
Do CPUs have assembler instructions to convert from int to float and back? or does compiler generate code to set the 64 bits of a float with sign, exponent and mantissa based on value of integer, after which floating point instructions can treat those 64 bits as a float?
@jfmezei Usually, yes. But like most things in IT, details can vary.
VAX has a wad of CVT conversion instructions, among other wads of instructions including the vector extensions, for instance. VAX offers instructions for pretty much everything to everything (everything circa 1978) and either has an instruction, or maybe has a macro.
For VAX floating point details, see section 9.9 here:
Details here will vary by architecture, and often by implementation within architecture. (q.v. Alpha extensions including the byte-word extension, and Arm SBSA, etc.)
Here’s an Alpha intro, as Alpha was effectively VAX with most of the latent VAX limits removed (not the least of which were the condition codes):
Alpha too has a wad of CVT conversion instructions.
The wrinkle with C code can be the implicit conversions that can (necessarily) arise when mixing data types. I’m not entirely certain a compound if {} else {} and a ?: ternary will produce the same outcome for all possible variations, and I’ve been using C for... for a while.
<voice=buzzlightyear>And UB, UB everywhere.
C looks kinda like a weird PDP-11 in various ways.
If you want to view the instructions of recent architectures, visit godbolt.
A couple of PDP-11s and a VT-105 terminal (with photobomb by Model 28 #Teletype gear) to brighten your evening.
This is shortly after I got a #pdp11 online; at this point, one of the two RX02 drives worked reliably, the RL01 and RL02 were good, and I thought the CPU and backplane was in good shape (I later learned there was a NPR chain problem on RX211backplane slot), and a lot of software ran correctly.
The rack on the right is … not suitable for this use.
A student just pointed out that a hackathon talk about text slicing and dicing at the #Unix prompt that I gave way back during lockdown days is still available online. It may be of interest to people who want to expand their repertoire of command-line ideas for processing data. There's a cameo by a #PDP11, an #Osborne1, a #Teletype, some floppy disks, and the usual detritus found around my basement, as well.
📚🏋️ Our well-equipped rack in the depot comprises:
🖥️ Xyplex MAXserver 1600 terminal server
🕸️ MiniArray III MultiTech communication server
📺 KILIAN 486
🧠 DEC PDP-11/34 minicomputer
➿ Cipher tape unit
💽 DEC DECpack RKO5J disk drive
💡 DEC PDP-11/44 minicomputer
@dosnostalgic VAX/VMS circa 1978 used to boot with PDP-11 RSX-11M compatibility mode available and a fair chunk of the apps in the early VAX/VMS versions were RSX-11M apps running in compatibility mode.
The VAX-11 boxes supported PDP-11 instructions in hardware.
You could run your existing PDP-11 RSX-11M apps directly, too.
That all ended at VAX/VMS V4.0 (~1984), and with then-new VAX models after VAX 8600.
VAX 8600 was originally to be named VAX-11/790, but marketing marketed and dropped the -11 with the “architecture for the ‘80s”.
PDP-11 RSX-11M compatibility mode became a separate product, and the PDP-11 instructions were emulated, and the -11 was dropped from VAX.
Technically, an LSI-11 console processor booted RT-11 from the 8” console floppy which then booted the VAX-11/780 (organizationally within he hardware, the VAX was an enormous LSI-11 peripheral) which ran VAX and PDP-11 instructions and which could run simh emulator to emulate PDP-11 running RT-11. If the LSI-11 failed—as happened on a couple of occasions—the VAX could continue to run. Just not reboot.
The approach Apple used for migrations with Rosetta and Rosetta 2 was far smoother.
Yeah. Fun times. When it all worked.
There are shenanigans in newer boxes too, but they’re usually somewhat better hidden.
No, I'm not logged into this PDP-11/70 from my Z80 "personal computer" kit to change my grade in Biology class. But I am logged into the BSD 2.11 Unix that is currently running on it using serial-to-telnet capability that understands Hayes-like modem commands.
Continuing my #PDP11 learning session: I used this famous ‘ed’ command that is in every Linux system but never insisted on using before. In comparison VIM suddenly seems quite user-friendly.
Someone has pulled me back into some mainframe retrocomputing. One thing that I've been doing is to update my retro Docker images, and they are turning out quite nice. I can now launch straight into:
PDP-11 UNIX V5/6/7
Interdata UNIX V6/7
DEC RT-11
DEC RSTS/E
PANDA TOPS-20
IBM MVS
IBM VM/370
Various PDP-8 things
Some of these can now also run in background - which takes some doing, but should allow for better tooling and greater flexibility. It's pretty "alpha" right now, but check it out if this sounds interesting. Feel free to ask questions and make suggestions. https://github.com/retroprom/docker
DVK-3, Soviet desktop computer compatible with PDP-11.
Even today it's common to find remains of such computers around the Chernobyl disaster area, says Alex the video host, "in a very destroyed condition, but this one... is intact."
That's why GE-designed/licensed nuclear reactors have their automation on a #PDP11:
Because that thing is rugged, tested, was certified once and no modern replacements got certified fulfilling criteria back then and espechally not today.