Hi everybody! Could anybody save me a headache and compile this code using a high level language and tell me to what translates in PIC16F84 assembler code. (I cannot find a fast version for this and sorry, I cannot afford to buy an expensive compiler) (All variables are 8 bit & all numbers are "decimal") (So A & C can't be greater than 255) C=0; while (A > 103) { A=A-8; C=C+1; } A=A-96; FSR=FSR+C; //FSR is PIC's indirect data memory address pointer bsf INDF,A //This one is in PIC code :) So if A=143 and we enter the while loop: 143>103 A=135 C=1 135>103 A=127 C=2 127>103 A=119 C=3 119>103 A=111 C=4 111>103 A=103 C=5 A=7 FSR+5 bsf INDF,7 Thank you........really!!!! P.S: In order to use a standard two-legged tin can 10 Mhz xtal in a PIC16F84 shall I choose XT or HS in oscillator settings? ------------------------------------ netQ http://virtuaweb.com/picprog "Home of amateur PIC programmers..." -----BEGIN PGP PUBLIC KEY BLOCK----- Version: 2.6.2 mQCNAzV38BkAAAEEALfWv9j3f+tZ+z2IW+2o9Ebx4bUGnHjHPqIe0a6yVKawaeV/ Y4I6L2/A0ddbVMG8+qJ0MvHNkr3DzYkpW+hTl9zAzXkKBdZ3GA5bbvot7entl/O2 YDtRWUV730koxBo5iFFUbJH5kbmkox+h3znj34zPnZNWzNaqOAwol3wABfBNAAUT tBxOZXRRIDxuZXRxdWFrZUBpbm5vY2VudC5jb20+ =0bVU -----END PGP PUBLIC KEY BLOCK-----