If in MicroCode studio click help and look at ADCIN. Might even find some useful code there.