Omnimaga

Calculator Community => TI Calculators => ASM => Topic started by: Hot_Dog on September 03, 2010, 11:17:28 am

Title: T-State Count of Undocumented IXH / IXL / IYH / IYL instructions
Post by: Hot_Dog 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?
Title: Re: T-State Count of Undocumented IXH / IXL / IYH / IYL instructions
Post by: thepenguin77 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
Title: Re: T-State Count of Undocumented IXH / IXL / IYH / IYL instructions
Post by: calc84maniac 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.