Hi Saif,
I made the mistake of reading just Windows XP in the OS part of your query and assuming that it was Visual FoxPro you were using.
Neither CREATEOBJECT nor STRTOFILE are available in FoxPro for DOS.
In this case I think your easiest solution would be to create two batch files say CASH.BAT containing the code
MODE COM2:9600,N,8,1
ECHO %1 > COM2
and POLE.BAT containing the code
MODE COM1:9600,N,8,1
ECHO %1 %2> COM1
The %x values are the command line parameters used by the batch file. The second .BAT needs two parameters for the case you gave, as the text you want to send has a space in it and this is interpreted by the system as two parameters.
When you want to send data to either of the two serial ports you could use the RUN command. Based on your example for the pole display it would be somthing like
RUN POLE.BAT "Dhs. 10"
Kulu thumam
Alan