33 points ibobev 3 hours ago 11 comments
Neywiny 1 hour ago | parent
I'm not much of an x86 person but on other architectures you can raise software interrupts/exceptions. Does x86 not have this or did those facilities not cover enough use cases?
349ru3h4f03 49 minutes ago | parent
x86 has...
INT Ib INT1 INT3 INTO BOUND
js8 47 minutes ago | parent
It's basically a convention. The alternative is to raise interrupts of course, but that might be application specific, or use other invalid instructions than the designated one, but they might work differently on other processor types.
omoikane 8 minutes ago | parent
Maybe because if the code wants to call the invalid opcode interrupt handler (INT6), it needs extra code to populate the flags and registers expected by that handler, whereas actually triggering an invalid opcode exception will get all those parameters populated automatically.
349ru3h4f03 50 minutes ago | parent
Nowadays UD0 UD1 UD2 are in the SDM and APM.
We also got UDB (D6), the one-byte variant that arrived with x86-64 for 64-bit mode.
And we have always had UDW (FF FF), aka group #5 (1st FF) with a modrm byte of mod=11b r/m=111b (/7) reg=111b (2nd FF) -- that one matters for memory with all bits set to 1, or for buses terminated to all 1 when no device claims an access.
dataflow 30 minutes ago | parent
Is this just his speculation? Or is there evidence for it?
qbane 18 minutes ago | parent
It's like why the first (hard) drive letter is C.
cyanydeez 16 minutes ago | parent
A: drive is 3.5; B: drive is 5.25; C: drive is hard disk
alightsoul 14 minutes ago | parent
Yeah it's a relic from when computers booted off floppy and hard disks were rare and expensive
compiler-guy 9 minutes ago | parent
Even further back into time, before 3.5" disks, both A: and B: were 5.25" disks. And, although my memory is hazy, 3.5's were commonly slotted into B: at first, because no one had 3.5" boot disks until the drives became somewhat common.