Author Topic: T-State Count of Undocumented IXH / IXL / IYH / IYL instructions  (Read 2165 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
T-State Count of Undocumented IXH / IXL / IYH / IYL instructions
« on: September 03, 2010, 11:17:28 am »
This is more of a curosity question than anything else, but if one uses the undocumented instructions to access the lower and upper bytes of IX and IY, does it take -- approximately -- twice the number of T-States as it takes for their equivalents in H and L to execute?

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: T-State Count of Undocumented IXH / IXL / IYH / IYL instructions
« Reply #1 on: September 03, 2010, 11:25:39 am »
Nope. Here is the way I look at it. $DD or $FD each take 4 t-states to run. Which in turn means that all ix iy commands take four t-states longer.

Code: [Select]
ld a, h ;4
ld a, ixh ;8

jp (hl) ;4
jp (ix) ;8

ld h, $FF ;7
ld ixh, $FF ;11
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 calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: T-State Count of Undocumented IXH / IXL / IYH / IYL instructions
« Reply #2 on: September 03, 2010, 11:25:57 am »
This is more of a curosity question than anything else, but if one uses the undocumented instructions to access the lower and upper bytes of IX and IY, does it take -- approximately -- twice the number of T-States as it takes for their equivalents in H and L to execute?
It adds 4 clock cycles (which are used to execute the $DD or $FD prefix). Note that you cannot load these upper/lower bytes of IX/IY to/from memory though.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman