News for hackers. Stuff that matters.
Re:The Future That Never Was by dspillett on Wednesday March 06, 2024 @11:14AM (#39617435)
> Probably the worst CPU architectural mistake of all time is locating that table at address 0.

I don't know if it persisted into 16-bit era CPUs & OSs, but early on the bottom of the memory map was faster to access, so things like interrupt tables¹ were often located there. The 6502 family even had specific load and save instructions for zero-page so not only was the actual operation faster once read & decoded, it took two bytes not three to store so was read faster² and took less space.

--

[1] you generally want the response to an interrupt to be as fast as possible, shaving a few clock cycles off could be pretty significant

[2] so a double time saving

Re:The Future That Never Was by rep_lodsb on Wednesday March 06, 2024 @04:44PM (#39622000)
It was only faster because of the shorter encoding, something that doesn't matter when the CPU itself is generating the address like on an interrupt. On the 6502, there is a single vector for maskable interrupts, and another for NMI, both of them at the top end of address space.

The 8086/8088 microcode that handled interrupts used a special "segment 0" to provide the address, I don't think it would have been difficult to have some other hardwired value instead of 0. And on later x86 chips there is an actual register for it (IDTR) that can be changed by software - even in real mode, though for reason of backwards compatibility this wasn't usually done.

Re:The Future That Never Was by tadfisher on Thursday March 07, 2024 @01:28PM (#39632721)
The 6502's interrupt vector is located at the _top_ of the memory map, but the reasoning is the same; you can simplify address decoding and shave clock cycles.