What's the easiest way to compare two numbers using PIC mid-range assembly? I have a very simple program and don't have much time to invest work on. I've done a bit of asm coding for PICs but not a lot... and too my suprise... have never needed to do a greater than/less than comparison. I was just wondering if there is any trick to keep this task simple? I'm working on a 'f877A and am storing the lowest and greatest value from the ADC (just upper 8 bits) into to file registers. Effectively: if (ADRESH > adc_max) adc_max = ADRESH; if (ADRESH < adc_min) adc_min = ADRESH; Is there an easy trick for greater than less than? - Micah -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist