Hi,

the included .C files was translated into .AS with:
	pacc -E -W-3 -S dta.c

Now look at the line "if(getdta() == dta)" (line #58).
Do you see that first the registers CX and BX are loaded with
values and then _getdta is called?

Well, somewhere in the PDF manual is explained that SI and DI are
registers to be preserved within a function, but all other registers
are for general use!

The compiler wrongly assumes that getdta() don't change CX and BX,
well, the source of trouble might lay in the inline assembly and that
neither BX nor CX are modified directly (only via the INT call).
