Hacker News new | ask | show | jobs
by jlmcgraw 2136 days ago
:You’re thinking of A86:

https://en.m.wikipedia.org/wiki/A86_(software)

3 comments

I can confirm. The author was an Intel engineer who was dissatisfied with how his senior engineers did the DOS EXE format in the intro of the docs of his assembler.

A86/D86 where fantastic, with extra bonus points for the docs.

Decades ago, I remember figuring out quite a bit of that, and here are my original notes from that, including tables that show the pattern clearly:

    MOV rA, rB:
         B: AL AH BL BH CL CH DL DH
    A:      1  1  0  0  1  1  0  0
    AL  1   ** ** 8A 8A ** ** 8A 8A
    AH  1   ** ** 8A 8A ** ** 8A 8A
    BL  0   8A 8A ** ** 8A 8A ** **
    BH  0   8A 8A ** ** 8A 8A ** **
    CL  1   ** ** 8A 8A ** ** 8A 8A
    CH  1   ** ** 8A 8A ** ** 8A 8A
    DL  0   8A 8A ** ** 8A 8A ** **
    DH  0   8A 8A ** ** 8A 8A ** **

    * = "reversed" opcode (88)

    MOV rA, rB ( word regs ):
         B: AX BX CX DX SP BP SI DI
    A:      1  0  1  0  1  1  0  0
    AX 1    ** 8B ** 8B ** ** 8B 8B
    BX 0    8B ** 8B ** 8B 8B ** **
    CX 1    ** 8B ** 8B ** ** 8B 8B
    DX 0    8B ** 8B ** 8B 8B ** **
    SP 1    ** 8B ** 8B ** ** 8B 8B
    BP 1    ** 8B ** 8B ** ** 8B 8B
    SI 0    8B ** 8B ** 8B 8B ** **
    DI 0    8B ** 8B ** 8B 8B ** **

    * = "reversed" opcode (89)

    The above tables apply for the following two-operand instructions:

        ADD             OR
        ADC             SBB
        AND             SUB
        XOR             CMP

    For TEST and XCHG, which are commutative, A86 always puts the first
    operand in the r/m field if possible, while MASM puts it in the reg
    field if the first operand is a register.
Wow! Back then, I was not quite sure if they had really implemented it or if they just claimed they had to encourage people to pay.

I would never have imagined that I'd get an answer to that question a quarter of a century later. Thanks for the comment!

It's been so long that I read that remark in the manual and I'm glad I wasn't just imagining it;-)