however you gave no info about the microcontroller family you will use but i can expect what you need.
if you are using PIC16 or PIC18 families just you will need to set ADCON0 and ADCON1 registers for PIC16 or ADCON0, ADCON1 and ADCON2 registers for PIC18 to set the PIC internal A/D, then read the A/D buffer when it exceeds a certain level make one of the digital I/O on another port output "1" to switch the relay on.
i know how to do it in "C" but i think you have the names of the registers so you can do it in assembly.
good luck
please check P16 mid range reference manual and PIC16F716 datasheet, also check microchip website for examples and assembly language manual.
remember to read from the datasheet the A/D section and the register you need to set.