> = > Here is the code for the loop > = > general_delay_out > = > mov delay_cntr,0ffh > = > :loop_1 nop > = > mov delay_inner, 0a0h > = > :loop_2 djnz delay_inner, :loop_2 > = > djnz delay_cntr, :loop_1 > = > ret > = > = > = > Thanks, > = > = > = > David I suspect you are moving the value at the register address 0ffh to delay_cn= tr = and the value at 0a0h to delay_inner instead of the constants 0ffh and 0a0h= . Or = actually 1fh and 00h for the 12C509. Try: movlw 0ffh movwf delay_cntr instead. /Ruben =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Ruben J=F6nsson AB Liros Electronic Box 9124, 200 39 Malm=F6, Sweden TEL INT +46 40142078 FAX INT +46 40947388 ruben@pp.sbbs.se =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist