See device under test datasheet. There you find all without need to go outside what it tells you to do.
Cblock 0x20 (you Know The Story)
Value1, Value2, Difference
Table:10
Endc
;configure Ports
;configure Adc
;turn This On
;turn That Off
Call Initialize_lcd
Main:
Call Capture_adc
Call Get_difference
Call Update_lcd
End_main
;-----------------------
Capture_adc
;see Device Datasheet
Return
;------------------------
;------------------------
Get_difference:
Movf Value1, W
Subwf Vaue2, W
Movwf Difference
Return
;-------------------------
;-------------------------
Update_lcd:
Movf Difference, W
Subwf Table+x, W
Btfss Status, Z
Goto Show_fail
Goto Show_pass
Show_pass
Call Lcd_send_pass
Goto Update_lcd1
Show_fail
Call Lcd_send_fail
Goto Update_lcd1
Update_lcd1
;do Any Other Stuff
Return
;--------------------------