And what are those numbers after semicolons (in the asm code below)? I originally though it's number of T-states, but POP must take at least 12T, definitely not 4T.
/--- Aley -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Edwin Blink Sent: Tuesday, February 01, 2005 1:48 PM To: sam-users@nvg.ntnu.no Subject: Re: Fastest memory transfer (on Sam) >I already tried many LDI's and PUSH/POP system on my own, but >unfortunately the process of changing SP makes PUSH/POP slower than >sequence of LDI's. The fastest scrollleft code I could think of is the folowing code snippet which should be repeated 9*height times and It's best to write a routine to generate it runtime and fill in the proper SP values. ;2 pixel scroll left code element 224Ts or 16T/byte ;AF' and index registers are note used as they slowdown the avarage speed. LD SP,&8001 ;12 HardCode address for each element POP AF ;4 POP BC POP DE POP HL exx ;4 POP BC POP DE POP HL dec sp ;8 push hl ;16 push de push bc exx push hl push de push bc push af It's 20% faster and takes 29% less space then LDI's. BTW These timings (and earlier mentioned) are RAM timings when the ASIC is NOT updating the display. Edwin