try to use a old driver under dos : problem

Hello, I have a problem to acces to a TSR driver under dos with turbo
pascal for windows.
The tsr program is a driver for a motion controller. In the program in
turbo pascal for windows, I give an adress to the tsr program and the
tsr program gives the result of the command at the adress.
The problem is that the TSR run in real mode and my program in protected
mode. The help of turbo pascal says that data should be copied in the
first 1 megabyte of adress spaces so that the real-mode software can
access the data.
This can be made with the function globaldosalloc but I don't no how to
use this function ?

If anyone can help me please, mail me