Can you show the disassembly?
Without having tried it out (no CW here), I would think your problem is the type long.
Long is a 4 byte type and a "LDD ClockCycles" loads the two most significant bytes.
Try to make ClockCycles a unsigned long or use LDD ClockCycles:2 to read the 2 least significant bytes.
>I believe the problem is that I need to do direct addressing.
Direct addressing is for variables in the zero page. Accessing variables on the stack is done with IDX (or IDX1/IDX2) with the SP used as index register. I think the syntax LDD ClockCycles is fine, probably just reads the wrong part of the variable.
Daniel