HELP: running a TP program under Mac emulator

I am trying to run a TP7 program for DOS under several Mac emulators for
DOS/Windows, but I get different kinds of errors.

With SoftWindows 3.11, I get:

 Runtime error 162 at 01A8:07DD.

With SoftPC, I got the following:

Runtime error 003 at 01A8:07DD.

Has anyone experienced this kind of problems, and if so, anyone has a
clue of how to compile the program so that it can run in the Mac?
Thanks a lot in advance.