- [eZ80] Are there hidden instructions ? I think so!
- 23 Mar 2016 03:23:47 pm
- Last edited by grosged on 23 Mar 2016 04:26:17 pm; edited 1 time in total
A few days ago I started to look for any hidden instructions, you know, like those found on Z80 !
Of course I began with the known (on Z80) ...
For now, I found only 1 (maybe 2) undocument eZ80 instruction which wouldn't reset my TI83PCE :
IN --,(c)
(see http://www.z80.info/z80undoc.htm)
and not in F,(c) as I badly wrote on Sax !
In order to check , I suggest this little program:
Code:
the result is %01000100 in f , that means 2 flags changed : Z and P/V
Bit 7 6 5 4 3 2 1 0
Flag S Z F5 H F3 P/V N C
Well, all that is fine but we need to confirm that no registers (amongst a,b,c,d,e,h,l, even ix and iy) have been changed after a "in --,(c)"
Let's run this:
Code:
the result is 255 , that means no registers changed !
I believe that in --,(c) does exist !.. And so does out (c),-- coded $ed,$71 (output a zero to the port)
And there might be more !
Of course I began with the known (on Z80) ...
For now, I found only 1 (maybe 2) undocument eZ80 instruction which wouldn't reset my TI83PCE :
IN --,(c)
(see http://www.z80.info/z80undoc.htm)
and not in F,(c) as I badly wrote on Sax !
In order to check , I suggest this little program:
Code:
ld bc,0
push bc
pop af ; af=0
.db $ed,$70 ; in --,(c) ...as expected ;)
push af ; put accumulator & flag register
pop hl ; into hl
jp _DispHL ; and display them
the result is %01000100 in f , that means 2 flags changed : Z and P/V
Bit 7 6 5 4 3 2 1 0
Flag S Z F5 H F3 P/V N C
Well, all that is fine but we need to confirm that no registers (amongst a,b,c,d,e,h,l, even ix and iy) have been changed after a "in --,(c)"
Let's run this:
Code:
push iy ; preserve iy
ld bc,$ffff00
push bc
pop af ; a=$ff , f=0
ld c,$ff
ld de,$ffffff ; all the registers = $ff
ld hl,$ffffff
ld ix,$ffffff
ld iy,$ffffff
.db $ed,$70 ; in --,(c) ...as expected ;)
and b
and c
and d
and e
and h
and l
and ixh
and ixl
and iyh
and iyl
ld hl,0
ld l,a
pop iy ; restore iy
jp _DispHL ; display accumulator
the result is 255 , that means no registers changed !
I believe that in --,(c) does exist !.. And so does out (c),-- coded $ed,$71 (output a zero to the port)
And there might be more !