> Edwin, > I have another question: On Spectrum, it was the basic asm knowledge that JR > is shorter but slower than JP. But how does it work on Sam? I assume > (without any exact computation) that due to the contention, JR is probably > faster than JP in general cases. Am I right? (I consider conditional jump > when the condition is true as the most important, i.e. general case.)
Well thats the good thing you get from the contention. There equal in length during ram contention and faster during display contention. So you can save a byte. Another good thing is that code like below will take the same amount of time during ram contention (not during display). cp Max+1 jr c,$+3 xor a here are some timings: rom, ram, display: JP nn 10(4,3,3) 12(4,3+1,3+1) 24(4+4,3+5,3+5) JR dis 12(4,3,5) 12(4,3,5) ) 16(4+4,3,5) JP cc,nn 10(4,3,3) 12(4,3+1,3+1) 24(4+4,3+5,3+5) JR cc,dis 12/7(4,3,5/4,3) 12/8(4,3,5/4,3+1) 16/16(4+4,3,5/4+4,3+5) DJNZ dis 13/8(5,3,5/5,3) 16/12(5+3,3,5/5+3,3+1) 16/16(5+3,3,5/5+3,3+5) Edwin

