Not actually in the AX register but in a tmp reg, right?
Undocumented 8086 instructions, explained by the microcode
71–80 of 104 posts
Re: Undocumented 8086 instructions, explained by the microcode
#72A lot of the undocumented instruction "match" bits make sense, such as POP CS at [0F]. However, it's clear that the authors of the microcode deliberately made every opcode match to some routine, as evidenced by Jcc being mirrored into the [60..6F] region, LOCK into [F1], group 2 /6 into /7, etc. It wouldn't've "cost" anything extra to make Jcc only match on its documented [70..7F] region (and others) like later proce…
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…
https://en.m.wikipedia.org/wiki/Halt_and_Catch_Fire_(computi...
although by the time I got to computing, the HCF didn't actually cause conflagration.
I think I recall a 1960s computer design that would poll a limited set of (magnetic core) memory addresses in its idle loop, which led to overheating in those memory elements. Boot loader for PDP-8? I don't think it was the CDC-6600...
Re: Undocumented 8086 instructions, explained by the microcode
#73> 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…
Somewhere around here, I've got a notebook, it's pages of hex dump written with a pencil in a child's handwriting. I couldn't afford a printer.
I grew up behind the Iron Curtain, the ZX Spectrum we had was smuggled into the country by my parents in 1985. What printer...? There was no printer to buy! More, we were soldering the data cable when it broke because what today looks like a bog standard 3.5mm mono cable was impossible to replace. It was not available and that was the end of the story.
Re: Undocumented 8086 instructions, explained by the microcode
#74Earlier quoted context omitted.
SYS 64738
In a similar vein, C000 == 49152 has been burned into my brain. I recognize it immediately, because that’s where most C64 assembly programs were loaded, followed by “SYS 49152” for loading them. A000 for example I recognize, but can’t tell you as quickly what it is in decimal as I can with C000.
0xA000 = 0xA × 0x1000 = 10 × 0x1000
and I guess you know 0x1000 = 4096Re: Undocumented 8086 instructions, explained by the microcode
#75Earlier quoted context omitted.
In a similar vein, C000 == 49152 has been burned into my brain. I recognize it immediately, because that’s where most C64 assembly programs were loaded, followed by “SYS 49152” for loading them. A000 for example I recognize, but can’t tell you as quickly what it is in decimal as I can with C000.
That address is where cartridges would appear in memory when plugged in, which is why it became SOP to use it.
Re: Undocumented 8086 instructions, explained by the microcode
#76This has been a niche programming challenge which was popular before I knew it existed, so I upped the ante by using alpha-numeric only.
The usable opcodes where practically IMUL and XOR with severe limitation on registers and offset. But with them I managed to create a random number generator that magically outputs fragments of codes at the location where the next instruction would be located. This would snowball adding more opcodes/functionality as it unrolls into a complete application.
It felt like the instruction set was so restricting and that the designers of the instruction set deliberately mapped the most critical instruction to make this possible to the opcode values. This has made me wonder what the considerations were to select which binary byte value to match with the instructions. if MUL/XOR were mapped differently, this project most likely would not have existed.
Synchronicity in overdrive:
https://xyzzy.github.io/smile/README.htmlRe: Undocumented 8086 instructions, explained by the microcode
#77This begs for the challenge: How would a program look like if the opcodes it could use exclusively consists of ASCII characters? This has been a niche programming challenge which was popular before I knew it existed, so I upped the ante by using alpha-numeric only. The usable opcodes where practically IMUL and XOR with severe limitation on registers and offset. But with them I managed to create a random number genera…
Video: https://youtube.com/watch?v=LA_DrBwkiJA
Paper (PDF): http://tom7.org/abc/paper.pdf
Paper (TXT): http://tom7.org/abc/paper.txt
Compiler (EXE): http://tom7.org/abc/paper.exe
Re: Undocumented 8086 instructions, explained by the microcode
#78This begs for the challenge: How would a program look like if the opcodes it could use exclusively consists of ASCII characters? This has been a niche programming challenge which was popular before I knew it existed, so I upped the ante by using alpha-numeric only. The usable opcodes where practically IMUL and XOR with severe limitation on registers and offset. But with them I managed to create a random number genera…
Tom Murphy VII (tom7) did such a thing. It's a partial C89 compiler that outputs only printable characters. In meta fashion, the compiler is compiled by itself to also contain only printable characters. The TXT and EXE files below are exactly the same. Video: https://youtube.com/watch?v=LA_DrBwkiJA Paper (PDF): http://tom7.org/abc/paper.pdf Paper (TXT): http://tom7.org/abc/paper.txt Compiler (EXE): http://tom7.org/ab…
Editted: What you reference to is a compiler and something completely different.
Re: Undocumented 8086 instructions, explained by the microcode
#79Aside: If you are writing stuff this good (and this niche) I would say ditch the ads. They really will turn off the audience you want to attract. Or at least use one of the developer-focused ad networks that just inline ads not pop them up.
Similarly, not having https properly configured is a huge turnoff - it literally takes 5 minutes with LetsEncrypt
Re: Undocumented 8086 instructions, explained by the microcode
#80Earlier quoted context omitted.
Tom Murphy VII (tom7) did such a thing. It's a partial C89 compiler that outputs only printable characters. In meta fashion, the compiler is compiled by itself to also contain only printable characters. The TXT and EXE files below are exactly the same. Video: https://youtube.com/watch?v=LA_DrBwkiJA Paper (PDF): http://tom7.org/abc/paper.pdf Paper (TXT): http://tom7.org/abc/paper.txt Compiler (EXE): http://tom7.org/ab…
Yes, like many others. That's why I upped the ante by stating "numeric and lowercase characters only". And with the glyph differences between them also create a "hidden" image. Editted: What you reference to is a compiler and something completely different.