Silicon reverse engineering: The 8085's undocumented flags (2013)
righto.com
righto.com
> question of why there were not documented
Possibly: s/there/these/ or s/there/they/ ?
The LDSI n [DE=SP+n] and LHLX [HL=(DE+1),(DE)] combination would be perfect for fetching HL from a parameter saved on the stack for instance. And using LDHI:LHLX would be perfect for doing similar for traversing pointers in data structures.
The fact they weren't documented really does look like Intel trying to sabotage the 8085 for the benefit of the 8086.
I don't entirely buy this explanation though. The overflow flag could have easily used the same bit on both, and the X5 flag behaviour could at least have been documented for INC/DEC, were it clearly "makes sense" from a high-level viewpoint, and would have been no trouble to implement the same way on the 8086.
And if 8080 compatibility was such an important goal, then why design the memory addressing on the 8086 so that it's impossible to translate LDAX/STAX and XTHL into single instructions?
If the 8086 ModR/M worked similar to how it did later in 32-bit mode (only without SIB), all of these 8080 and 8085 instructions would have had an equivalent:
LDAX -> MOV AL,[CX] (etc.)
XTHL -> XCHG BX,[SP]
LDSI -> LEA DX,[SP+n]
LHLX -> MOV BX,[DX]
Dropping conditional call/return was probably the right decision (even though they could be very useful on occasion!), but the absence of conditional jumps with full 16-bit offset was IMO a mistake. If you don't believe that, maybe try writing a compiler (generating 8086 machine code directly) that doesn't emit the most stupid 5 byte code for every forward jump. It's possible of course, but not easy. Opcodes 60h-6fh were right there!