Worthy books like the Advanced User Guide list the number of cycles for each 6502 instruction, so the delay required can be calculated. The easiest thing to do is to construct a delay loop with an incrementing or decrementing counter, remembering that jumping to the loop subroutine and returning from it are to be included in the calculation of cycles.