Hi, I've got some source code in QBasic I would like to translate to Delphi 4 (Object Pascal). I would be glad if someone could help me out.<br>I've got the same source for Turbo Pascal, Visual Basic 3.0 & 4.0, C and QBasic.<br>You'll think: he's got it in Turbo Pascal, why not use it in Delphi directly. Well I tried but it makes use or TPs PORT array, which doesn't exist in Delphi.<br><br>Here's one of the most important procedures. If you really want to help me, I could send you one of the units.<br>Mind that I've never programmed in this language before, so there could be some missing things.<br><br><FONT FACE=monospace><br>SUB ReadIOchip (ChipNo%)<br> I2Cstart<br><br> DataVar% = IOChipCode%(ChipNo%) OR 1<br> I2Coutput DataVar%<br><br> I2Cclockpulse<br><br> IOdata%(ChipNo%) = I2Cinput<br> IOdata%(ChipNo%) = BINNOT(IOdata%(ChipNo%))<br> I2Cclockpulse<br><br> I2Cstop<br><br> StartChannel% = ChipNo% * 8 + 1<br> Temp% = IOdata%(ChipNo%)<br> DataVar$ = DecToBin(Temp%)<br> FOR Channel% = 0 TO 7<br> IF MID$(DataVar$, 8 - Channel%, 1) = "1" THEN<br> IO%(StartChannel% + Channel%) = 1<br> ELSE<br> IO%(StartChannel% + Channel%) = 0<br> END IF<br> NEXT<br>END SUB<br></font><br><br>Thanks in advance, <p>Bert Vingerhoets<br><a href=mailto:vingerhoetsbert@hotmail.com>vingerhoetsbert@hotmail.com</a><br><a href= > </a><br>