Image Map Image Map
Page 1 of 4 1234 LastLast
Results 1 to 10 of 31

Thread: 8088/8086 microcode disassembly

  1. #1

    Default 8088/8086 microcode disassembly

    Using Ken Shirriff's beautiful die shots, I've reverse-engineered the format of the microcode ROM in the Intel 8088 and 8086 CPUs and disassembled it: https://www.reenigne.org/blog/8086-m...-disassembled/ . Remarkably, I've uncovered some undocumented instructions which nobody seems to have noticed in the more than 42 years since the 8086 was released!

  2. #2
    Join Date
    Jan 2007
    Location
    Pacific Northwest, USA
    Posts
    35,121
    Blog Entries
    18

    Default

    Nice work!

  3. #3

    Default

    Amazing! Does this mean you're going to make a microcode level emulator?

  4. #4

    Default

    I'm definitely going to use this to improve my 8088 emulator. I don't think I'll interpret the actual microcode instructions (that would be slow), but I do plan on structuring the emulator to work the same way that the microcode program does (in terms of which opcodes share code, what the subroutines are - things like that). That should simplify it substantially.

  5. #5
    Join Date
    Mar 2011
    Location
    Atlanta, GA, USA
    Posts
    1,618

    Default

    I /bow down.. I'm not worthy!
    "Good engineers keep thick authoritative books on their shelf. Not for their own reference, but to throw at people who ask stupid questions; hoping a small fragment of knowledge will osmotically transfer with each cranial impact." - Me

  6. #6

    Default

    that's nice work

  7. #7
    Join Date
    May 2006
    Location
    Melbourne, Australia
    Posts
    6,833

    Default

    Quote Originally Posted by reenigne View Post
    Remarkably, I've uncovered some undocumented instructions which nobody seems to have noticed in the more than 42 years since the 8086 was released!
    Good to see that you didn't reveal to the world the undocumented divide-by-zero instruction, an instruction added at the request of certain government agencies, an instruction that results in the 8088/8086 quickly heating up to the point of destruction (and burning a hole through the motherboard).

  8. #8

    Default

    Quote Originally Posted by modem7 View Post
    Good to see that you didn't reveal to the world the undocumented divide-by-zero instruction, an instruction added at the request of certain government agencies, an instruction that results in the 8088/8086 quickly heating up to the point of destruction (and burning a hole through the motherboard).
    The world is not yet ready for a singularity on every desktop!

  9. #9
    Join Date
    Jan 2007
    Location
    Pacific Northwest, USA
    Posts
    35,121
    Blog Entries
    18

    Default

    Is the REPZ MUL complementing specific to the 8086/8088. Trying it on several later CPUs causes the REP to be ignored.

    e.g.

    Code:
        MOV     AX,3
        MOV     BX,2
        REPE
        MUL      BX
    Always returns AX=6 on later CPUs. Haven't tried it on a V20/V30 yet.

  10. #10

    Default

    Quote Originally Posted by Chuck(G) View Post
    Is the REPZ MUL complementing specific to the 8086/8088.
    Probably! Any CPU that doesn't use the same microcode program is extremely unlikely to have the same behaviour - reusing the REP flag to mean "negate" (and not resetting it at the start of the multiply and divide operations) is not a particularly obvious design choice. I'd be surprised if it worked on V20/V30 as well - they have significantly faster multiplies so certainly an entirely different microcode routine.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •