From: Geoff Winkless <[EMAIL PROTECTED]>

> Trying to think this through...

Like the Idea. So I looked a bit better at LDIR in ROM too.

LDIR is made up of 5 M-cycles:
4,4,3,5,5 for standard LDIR = 21T
4,4,3+1,5,5+2 LDIR in RAM with RAM contemption = 24T
4+4,4+4,3+5,5,5+6 LDIR in RAM with Display contemption = 40Ts
4,4,3+1,5,5+2 LDIR in ROM with RAM contemption = 24Ts
4,4,3+5,5,5+6 LDIR in ROM with Display contemption = 32Ts

>From this you can see that a LDIR in ROM during RAM contemption is
as fast as when the LDIR that is in RAM, during display contemption it is
8Ts faster. But it still is 32Ts per byte. So the SP method is still worth
the effort.

When looking at a LDI:
a LDI takes 4 Mcycles:
4,4,3,5 Standard = 16Ts
4,4,3+1,5+3 LDI in RAM with RAM contemption =20Ts
4+4,4+4,3+5,5+3 LDI in RAM with display contemption =32Ts
4,4,3+1,5+3 LDI in ROM with RAM contemption =20Ts
4,4,3+5,5+3 LDI in ROM with display contemption =24Ts

>From the above timings you can see that a block of LDIs is 4Ts or 16.6% per
byte faster then a LDIR
(anywhere) during RAM contemption. But during display contemption a  LDIR in
ROM is
as fast as a LDI in RAM. 41% of the time there is display contemption so
large block of LDI's
would then be a little under 10% faster than a LDIR in ROM.
When using a LDIR in ROM or in RAM then on large blocks the rom version is
8.2% faster.

Edwin

Reply via email to