K8000 in dos

I have a few K8000’s running simple processes. Programs are under dos + Turbo Pascal and have been working well for years.
I have had to replace an antique laptop with a more modern one (pentium) which still has legacy Parallel Printer ports.

I have come across an oddity which I suspect is from the i2c module.
Outputs work perfectly. AD converter behaves oddly.

AD reads are somewhat erratic and basically the last two (LSB) bits are lost, sometimes the third.

Windows test program shows the board is working correctly.

Dos test program behaves very oddly, copying the one active AD converter to all the others even when one is deliberately grounded.

I suspect this is a timing problem in i2c.pas since the new machines are “quite a bit” faster than the older ones.
Which is the key timing section?

Unless you know better…

NB Native dos 6.22 boot, windows completely absent.

I have rerun the software and k8000 on an old computer and it works fine.
I have run the software on a completely different modern computer and it fails again.

Some change in architecture/pascal drivers, then.

Any ideas?

First sign of madness …

Problem solved.

Set I2CBusDelay = 2000 NOT in I2C.pas but in main program (that calls unit I2C).

Faster processors may need larger numbers.
There may be a way to set this for all processors but experimentation would be needed, or our moderator knows someone who knows…

In passing using AllowIO.exe (Porttalk) from Beyondlogic works fine, allowing pure pascal dos to run K8000 devices under XP.
One advantage is that many XP video drivers will display 640x480 in full screen even if the physical display is greater.
Clearly you must have a dos (fat) drive for this. Make it C: and you can dual boot dos/xp as you wish.