Author Topic: Why are undocumented instructions "undocumented"?  (Read 5446 times)

0 Members and 1 Guest are viewing this topic.

Offline Hot_Dog

  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Why are undocumented instructions "undocumented"?
« on: December 29, 2010, 09:39:46 am »
Why did the Z80 producers leave some code operations undocumented?  Did they not have time to "test" these instructions, did they come about accidentally in the design of the processor, or what?

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Why are undocumented instructions "undocumented"?
« Reply #1 on: December 29, 2010, 09:40:43 am »
Why did the Z80 producers leave some code operations undocumented?  Did they not have time to "test" these instructions, did they come about accidentally in the design of the processor, or what?

Did TI not want to release them?

Offline JosJuice

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1344
  • Rating: +66/-14
    • View Profile
Re: Why are undocumented instructions "undocumented"?
« Reply #2 on: December 29, 2010, 09:47:04 am »
Why did the Z80 producers leave some code operations undocumented?  Did they not have time to "test" these instructions, did they come about accidentally in the design of the processor, or what?

Did TI not want to release them?
TI didn't make the Z80. The Z80 is used in many different devices, not just TI calcs.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Why are undocumented instructions "undocumented"?
« Reply #3 on: December 29, 2010, 10:01:37 am »
:O Didn't know about it, then no idea.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Why are undocumented instructions "undocumented"?
« Reply #4 on: December 30, 2010, 03:56:45 am »
Maybe TI didn't know about them, or they did not want us to know about them? I don't really know, though.

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: Why are undocumented instructions "undocumented"?
« Reply #5 on: December 31, 2010, 10:16:27 pm »
I'm not exactly sure why the instructions are undocumented. The best guess I can make is that they are optionally supported. So, it's common knowledge that they are there, but if the very early models or late models don't support them, then they won't be disobeying the z80 spec.

I think I remember reading something to that extent somewhere some time ago.
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline Juju

  • Incredibly sexy mare
  • Coder Of Tomorrow
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 5730
  • Rating: +500/-19
  • Weird programmer
    • View Profile
    • juju2143's shed
Re: Why are undocumented instructions "undocumented"?
« Reply #6 on: December 31, 2010, 10:38:04 pm »
Well, obviously they didn't used all the opcodes from 00 to FF, so all the unused numbers are undocumented and do random things they don't know about. That's my guess.

Remember the day the walrus started to fly...

I finally cleared my sig after 4 years you're happy now?
THEGAME
This signature is ridiculously large you've been warned.

The cute mare that used to be in my avatar is Yuki Kagayaki, you can follow her on Facebook and Tumblr.

Offline Iambian

  • Coder Of Tomorrow
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 739
  • Rating: +216/-3
  • Cherry Flavoured Nommer of Fishies
    • View Profile
Re: Why are undocumented instructions "undocumented"?
« Reply #7 on: December 31, 2010, 10:53:13 pm »
There's a couple of reasons I can suggest as to why they're undocumented.

First and probably the main reason, instructions that weren't originally in the instruction set worked predictably due to the logic that the Z80 performed. The Z80 is quite a logical chip, so under most circumstances, logic would dictate a few things that weren't intended. Like being able to load the high and low bytes of the IX/IY registers independently.

Well, I guess I don't have a second reason.

There was a site that explained all this clearly, but it was on the Geocities thing that got shut down like last year or so. Wished I could've saved it.
A Cherry-Flavored Iambian draws near... what do you do? ...

Offline Hot_Dog

  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Why are undocumented instructions "undocumented"?
« Reply #8 on: January 01, 2011, 12:52:24 am »
First and probably the main reason, instructions that weren't originally in the instruction set worked predictably due to the logic that the Z80 performed. The Z80 is quite a logical chip, so under most circumstances, logic would dictate a few things that weren't intended. Like being able to load the high and low bytes of the IX/IY registers independently.

And that makes a lot of sense

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: Why are undocumented instructions "undocumented"?
« Reply #9 on: January 01, 2011, 07:51:23 am »
@ Iambian: So basically, you're saying that the undocumented ones worked based upon how the Z80 is structured?

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Why are undocumented instructions "undocumented"?
« Reply #10 on: January 01, 2011, 05:59:20 pm »
That makes sense to me, i was writing a CPU in Logisim once and i didn't use every single opcode, and using the ones that i had not implemented sure would do *something* but probably weird things that would be weird and not useful, but consistent.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Why are undocumented instructions "undocumented"?
« Reply #11 on: January 01, 2011, 10:20:40 pm »
There's a couple of reasons I can suggest as to why they're undocumented.

First and probably the main reason, instructions that weren't originally in the instruction set worked predictably due to the logic that the Z80 performed. The Z80 is quite a logical chip, so under most circumstances, logic would dictate a few things that weren't intended. Like being able to load the high and low bytes of the IX/IY registers independently.

Well, I guess I don't have a second reason.

There was a site that explained all this clearly, but it was on the Geocities thing that got shut down like last year or so. Wished I could've saved it.
Could it be the RichFiles? I think it's still available elsewhere, but I forgot the link.