Page 1 of 1
Undocumented instructions OR IY
Posted: Thu Jul 15, 2021 8:12 am
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.
Re: Undocumented instructions OR IY
Posted: Thu Jul 15, 2021 6:02 pm
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:
Re: Undocumented instructions OR IY
Posted: Sat Jul 17, 2021 9:49 pm
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
Re: Undocumented instructions OR IY
Posted: Sun Jul 18, 2021 6:52 am
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?
Re: Undocumented instructions OR IY
Posted: Sun Jul 18, 2021 10:22 pm
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 ?
Re: Undocumented instructions OR IY
Posted: Sun Jul 18, 2021 10:27 pm
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.
Re: Undocumented instructions OR IY
Posted: Mon Jul 19, 2021 1:09 pm
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.
Re: Undocumented instructions OR IY
Posted: Mon Jul 19, 2021 1:54 pm
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.
Re: Undocumented instructions OR IY
Posted: Tue Jul 20, 2021 10:19 am
by Pacman
I have just compiled it, it is excellent as software ... I adopt! thank you.