Reading the Explorer hat ADC from RISC OS

Is there any sample code anywhere for reading the Explorer HAT ADC from RISC OS.
Alan