I have added an i2test routine in rpi_hal to show you the usage of the i2c routines.
pls. download newest rpi_hal (Version 1.3). the i2c_test reads and writes to an rtc 3232m clock
chip. If you have a different chip hooked up to the i2c bus, then the code give you just an idea how to use them:
i2c_string_write($68,$05,#$08+#$12,NO_TEST); // write 08 in reg 0x05 and 12 in reg 0x06
s:=i2c_string_read($68,$05,2,NO_TEST); showstr(s); // read 2 bytes. startreg is 0x05
program i2ctest;
uses rpi_hal; { minimum version V1.3 required }
begin
writeln('program start');
i2c_test;
writeln('program end');
end.