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:
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 ! Very Happy
Are you sure it's not "in (hl),(bc)"?

The z80 uses three-bit codes in the lower three/six bits of a byte for registers. 0x60 is "ld h, b"; 70 is "ld (hl),b"; so it makes sense if ED60 is "in h, (bc)" that ED70 would be "in (hl),(bc).
Good hypothesis , Lirtosiast Idea
I even had a doubt during a few seconds Very Happy
I've checked, I confirm that it's actually not "in (hl),(bc)" Rolling Eyes
I've just found another one !
in0 --,(n) ( coded $ed,$30,n )

It means port ({UU,00h,n}) put to nowhere.
The flags changes the same way as in --,(c)
I can confirm that ED30 is in0 (n) and ED70 is in (bc) (or in0 f,(n) and in f,(bc) as I have seen them called, even though that is misleading). However, I tested ED71 and it is definitely a trap. Actually, now that I think about it, I can probably modify this program to find every trap....

Edit: Just checked all of the ED instructions on calc, and ED30/ED70 are the only ones that are undocumented.
Edit 2: Checked all CB insts (including indexed), sll and autocopy are all traps as expected.
thanks, Jacobly Wink
I wish we could find some "non IO" hidden intructions ! Too bad!
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement