> The undocumented C9 opcode is identical to the documented CB, far return instruction. I remember this. Once ... gosh, it's hard to believe how long ago that was now, but once I knew the entire Z80 opcode table off head. I could read the Z80 machine code and disassemble it. High school crowded that stuff out of my head, I went to a special math school, it was very very hard. Except... C9 was RET (and the Z80 is an e…
As a total aside, domain expertise is kind of amazing. Like, you can look at a string of opcodes from a processor that you haven’t touched for a decade-plus, and still recognize what’s going on. It’s important to remember that applies in all fields. That bumpkin that grew up on a farm? Sure, he might not be able to write an award-winning essay, but he could probably tell you everything you need to know about your loc…
Undocumented 8086 instructions, explained by the microcode
51–60 of 104 posts
Re: Undocumented 8086 instructions, explained by the microcode
#52Re: Undocumented 8086 instructions, explained by the microcode
#53Re: Undocumented 8086 instructions, explained by the microcode
#54Offtopic: this is an excellent series on the 8086! Do you have plans to give a similar treatment to the Motorola 68000?
When I'm done with the 8086, I might look at the 68000 but I don't have any specific plans.
I'm curious how Motorola's circuit design and approach differs from Intel's.
Re: Undocumented 8086 instructions, explained by the microcode
#55> The undocumented C9 opcode is identical to the documented CB, far return instruction. I remember this. Once ... gosh, it's hard to believe how long ago that was now, but once I knew the entire Z80 opcode table off head. I could read the Z80 machine code and disassemble it. High school crowded that stuff out of my head, I went to a special math school, it was very very hard. Except... C9 was RET (and the Z80 is an e…
I have most of the single-byte x86 opcodes still memorised - as many others have independently discovered, it's much easier in octal. 95 ba 07 01 cd 21 c3 48 65 6c 6c 6f 20 77 6f 72 6c 64 21 0d 0a 24
Re: Undocumented 8086 instructions, explained by the microcode
#56Although these registers are normally not accessible by the programmer, some undocumented instructions provide access to these registers, as will be described later. Reminds me of the MEMPTR on Z80: https://gist.github.com/drhelius/8497817 Also, I'm not sure if you've explored 8f/1-7 yet, since it's not mentioned in the article, but I suspect it's just the same as pop r/m16 (8f/0) as it ignores the subopcode bits com…
Are they? There's a lot of different opcodes for push and pop, but if I'm reading right, for a given address mode, the op code for push and pop always differs by one bit (which bit changes though)
https://www.felixcloutier.com/x86/push https://www.felixcloutier.com/x86/pop
Re: Undocumented 8086 instructions, explained by the microcode
#57Earlier quoted context omitted.
There's a reason why every 8086 opcode matches something. If an instruction didn't match anything, I think the microcode engine would spin idle and the instruction would never terminate. (You need a RNI micro-instruction to end microcode processing.) Having your processor lock up due to a bad opcode is something that the designers presumably explicitly avoided. The 6502 on the other hand, didn't take such precautions…
Also the 6800, with its famous HCF (Halt and Catch Fire) instruction: > With the advent of the MC6800 (introduced in 1974), a design flaw was discovered by programmers. Due to incomplete opcode decoding, two illegal opcodes, 0x9D and 0xDD, will cause the program counter on the processor to increment endlessly, which locks the processor until reset. Those codes have been unofficially named HCF. During the design proce…
Re: Undocumented 8086 instructions, explained by the microcode
#58Earlier quoted context omitted.
What ads? Didn't seen any ads when visiting the page. Are you browsing the web without uBlock Origin by any chance?
I see this kind of “ads? I didn’t see any ads in my ad-blocking browser!” response practically every time someone mentions ads on here. Can I ask what you’re trying to achieve? Do you think the HN audience is unaware of ad blockers?
Clearly some portion of the HN audience might be unaware, as they are in this thread complaining about ads.
Re: Undocumented 8086 instructions, explained by the microcode
#59Earlier quoted context omitted.
As a total aside, domain expertise is kind of amazing. Like, you can look at a string of opcodes from a processor that you haven’t touched for a decade-plus, and still recognize what’s going on. It’s important to remember that applies in all fields. That bumpkin that grew up on a farm? Sure, he might not be able to write an award-winning essay, but he could probably tell you everything you need to know about your loc…
[flagged]
Re: Undocumented 8086 instructions, explained by the microcode
#60Although these registers are normally not accessible by the programmer, some undocumented instructions provide access to these registers, as will be described later. Reminds me of the MEMPTR on Z80: https://gist.github.com/drhelius/8497817 Also, I'm not sure if you've explored 8f/1-7 yet, since it's not mentioned in the article, but I suspect it's just the same as pop r/m16 (8f/0) as it ignores the subopcode bits com…
> It's very weird that the push and pop are in completely different places in the opcode map. Are they? There's a lot of different opcodes for push and pop, but if I'm reading right, for a given address mode, the op code for push and pop always differs by one bit (which bit changes though) https://www.felixcloutier.com/x86/push https://www.felixcloutier.com/x86/pop