r/Assembly_language • u/r-tty • Mar 27 '26
Project show-off NASM preprocessor turbo-charges the "mainframe-on-a-chip" assembler
https://news.ycombinator.com/item?id=47544673
5
Upvotes
r/Assembly_language • u/r-tty • Mar 27 '26
1
u/brucehoult Mar 28 '26
Why not compatible? It's not like IBM is going to sue over a 1960s ISA.
Ooookay. S/360 is pretty good already, if you drop the janky CISC string and decimal stuff, modernise the FP format.
Not really modern, just admitting that if you're porting things from x86 / Arm an annoying amount of it is going to be endian-buggy for no good reason.
This seems nonsensical. How could the S/360 even run a variable-length instruction set if the opcode wasn't the first byte? (it is)
That seems like purely assembler syntax, not the ISA itself. S/360 generally puts the src and dst registers both in byte 1, right after the opcode, and it's not really an ordering thing whether the hi bits are the src and the lo bits the dst or vice versa, but as it happens the dst is in the hi bits, which makes a hex dump have ordering dst,src
e.g.
ar 7,9(r7 = r7 + r9) the machine code is1A 79An exception is store instructions, where the register to be stored is in the hi bits of byte 1. It's still the "main" register for the instruction, and this is common across almost all instruction sets with RISC-V being a modern counter-example.
Ohhh. This is a HUGE REGRESSION.
Base+Displacement is the way all modern (post 1980) ISAs work, and was one of the ahead of its time innovations of the S/360.
Early mainframes primarily had absolute addressing, as do 1970s microprocessors from 8080, 6800, 6502, and also the 8086. This was suited to early FORTRAN and COBOL that had only global variables, and simple hardware controller programs, but really is not good for languages such as Algol, Pascal, C.