Undocumented instructions OR IY

Post Reply
User avatar
Pacman
Posts: 144
Joined: Mon Feb 05, 2018 2:59 pm

Undocumented instructions OR IY

Post by Pacman »

Hello,
I have a little problem with undocumented instructions:
on the site http://www.z80.info/z80undoc.htm we have
- OR IYH which is coded FD B4
- OR IYL which is coded FD B5
Or z80asm (Z80 assemble version 1.8 Copyright (C) 2002-2007 Bas Wijnen <shevek@fmf.nl>) does the opposite!
Should I trust the site or the software?
Thank you.
hlide
Posts: 552
Joined: Thu Jan 25, 2018 9:31 pm

Re: Undocumented instructions OR IY

Post by hlide »

https://clrhome.org/table/#or%20ixl

says OR IXL is DDB5.

I use Visual Studio Code with some extensions like Z80 Assembly Meter and Z80 Instruction Set and they tell the same thing. And so is the assembler I use. So I believe z80asm is wrong.

Same for ASM80 online:
asm80_or_ixl.png
hlide
Posts: 552
Joined: Thu Jan 25, 2018 9:31 pm

Re: Undocumented instructions OR IY

Post by hlide »

I posted an issue the savannah.nongnu.org but it seems there is already one because it seems to be fixed now:
https://git.savannah.nongnu.org/cgit/z8 ... 6cb37c6cc2
User avatar
Pacman
Posts: 144
Joined: Mon Feb 05, 2018 2:59 pm

Re: Undocumented instructions OR IY

Post by Pacman »

Yes I just recompiled it, and it works for all codes except compounds:

RLC (IX + nn) & LD R, (IX + nn) etc ...

RRC (IX + nn) & LD B, (IX + nn)
RL (IX + nn) & LD B, (IX + nn)
RR (IX + nn) & LD B, (IX + nn)
SLA (IX + nn) & LD B, (IX + nn)
SRA (IX + nn) & LD B, (IX + nn)
SLL (IX + nn) & LD B, (IX + nn)
SRL (IX + nn) & LD B, (IX + nn)

RES B, (IX + nn) & LD B, (IX + nn) etc ...

SET B, (IX + nn) & LD B, (IX + nn) etc ...

and these codes are unknown

SLL R

IN F, (C)
OUT F, (C)

Besides, there is no more compact notation for codes composed of 2 instructions?
hlide
Posts: 552
Joined: Thu Jan 25, 2018 9:31 pm

Re: Undocumented instructions OR IY

Post by hlide »

IN F,(C) is an aberration (as the same way as JP (HL) instead of JP HL) should be IN (C) because we don't store value from data bus into F register.

You mean OUT (C),0 ?
hlide
Posts: 552
Joined: Thu Jan 25, 2018 9:31 pm

Re: Undocumented instructions OR IY

Post by hlide »

There is RASM which allows compact notation like:
- PUSH AF, BC, HL, DE -> PUSH AF : PUSH BC : PUSH HL : PUSH DE
- SRL HL -> SRL H : RR L

And so on.
User avatar
Pacman
Posts: 144
Joined: Mon Feb 05, 2018 2:59 pm

Re: Undocumented instructions OR IY

Post by Pacman »

I was thinking especially for this kind of notation:
RRC (IX + nn) & LD B, (IX + nn)
which corresponds to an undocumented code

On http://www.z80.info/z80undoc.htm there is a list of undocumented code and among others the IN F, (C) and OUT F, (C) are part of it but with a "?", so i imagine never tested.
hlide
Posts: 552
Joined: Thu Jan 25, 2018 9:31 pm

Re: Undocumented instructions OR IY

Post by hlide »

IN F,(C) is known as IN (C) in assemblers which handle it.

All undocumented opcodes are known: https://baltazarstudios.com/z80explorer/.

https://baltazarstudios.com is in my opinion a great website to master all the aspects of Z80 (including what is done under M-cycles/T-states and even half-cycles) and has a lot schematics explaining in details each part.
User avatar
Pacman
Posts: 144
Joined: Mon Feb 05, 2018 2:59 pm

Re: Undocumented instructions OR IY

Post by Pacman »

I have just compiled it, it is excellent as software ... I adopt! thank you.
Post Reply