Re: Early-2014 Macbook Air and Linux Mint Cinnamon
Rich <[email protected]>
| Newsgroups | comp.os.linux.misc |
|---|---|
| Organization | A noiseless patient Spider |
| Message-ID | <[email protected]> |
In comp.os.linux.misc Charlie Gibbs <[email protected]> wrote: > On 2026-06-24, John Ames <[email protected]> wrote: > >> On Wed, 24 Jun 2026 19:42:20 GMT >> Charlie Gibbs <[email protected]> wrote: >> >>> I figured that if they were going to do that, they might as well go >>> whole hog and have constructs like LD PC,<addr> for a jump, and LD >>> A,@<portnum> for input (LD @<portnum>,A for output, of course). >> >> MOV [operand], PC is actually a valid if non-conventional form of jump >> on the PDP-11; the primary difference is that it sets the flags based >> on the value of the target address. And, of course, it has memory- >> mapped I/O, so MOV Rn, [port]/MOV [port], Rn is indeed how it's done ;) > > I remember being dazzled by the PDP-11's machine code. Making PC and > SP just another two registers allowed all sorts of neat tricks, such > as enabling programmers to write threaded code that the hardware could > interpret as a byproduct of the architecture, not by convoluted tricks. The DEC Alpha achieved a similar result using it's hardwired all zero R31 register. Creative use of R31 as a source or sink converted what was about 8 basic hardware addressing modes into about twenty some different assembly programmer visible addressing modes. Other tricks meant that instead of an actual opcode for nop (IIRC) the "nop" was something like "mov r31,r31" instead. Section A.4.6 of this Alpha book: https://download.majix.org/dec/alpha_arch_ref.pdf details all the different "instructions" that were synthesized by using other actual opcodes and the R31 register as source or sink or both.