[comp.lang.pascal] HELP FOR TURBO BIOS CALLS NEEDED!!

glazer@osupyr.UUCP (Jon Glazer) (08/11/87)

This is IBM-PC related of course...

I am writing a program that I hope to be able to operate remotely.  The
problem is that I would like to send output through the BIOS so that 
when issuing the command CTTY COM1 (change console to com1) output goes
to correct device.  DOS does this without any problem and so do programs such
as EDLIN.  Could someone tell me how to write such a routine??
 
Thanks in Advance
Jon

*******************************************************************************
*                        *                        * At                        *
*       Jon Glazer       * The |\/|     |  |      *     Ohio State University *
* Sysop of MGS (IBM BBS) *     |  |     |  |      *        Columbus, Ohio     *
*     (614)-848-5971     *     |  |ICRO |/\|IZARD *         Via PYRAMID       *
*                        *                        *     [glazer@osupyr.UUCP]  *
*                        *                        *    [glazer%osupyr@cposgd] *
*******************************************************************************

ayac071@ut-ngp.UUCP (08/11/87)

In article <88@osupyr.UUCP> glazer@osupyr.UUCP (Jon Glazer) writes:
>This is IBM-PC related of course...

I assume your are running the IBM-PC specific version of Turbo Pascal, not
the more generic MS-DOS version.

>I am writing a program that I hope to be able to operate remotely.  The
>problem is that I would like to send output through the BIOS so that 
>when issuing the command CTTY COM1 (change console to com1) output goes
>to correct device.  DOS does this without any problem and so do programs such
>as EDLIN.  Could someone tell me how to write such a routine??

In the IBM version, Turbo Pascal sends its console i/o through the bios
interface.  It essentially bypasses DOS for nearly all activities, for the
sake of speed.  Unfortunately, bypassing DOS means bypassing the ability
to re-direct input and output, such as that done by the CTTY command.

If you have version 3.0 or higher, try using the compiler directives
		{$P1} {$G1}
at the start of your code.  This results in the compiler using the DOS
system calls, instead of the bios, for console input/output.  Then you
should be able to redirect you i/o through the modem.

If you are using the MS-DOS version of TP, you shouldn't have this problem,
as that version uses the DOS interface by default.

Bill Douglass
ayac071@ngp.UUCP