[comp.lang.c] Simulate carriage return?

darcy@druid.uucp (D'Arcy J.M. Cain) (06/05/90)

In article <1990Jun4.024007.8419@ug.cs.dal.ca> reiniger@ug.cs.dal.ca (Darren Reiniger) writes:
>
>    I'm hoping someone out there can help me with this problem.  I'm currently
>writing a simple TSR, maybe 'trying to write' would be a better word, but
>anyways.  In this TSR I need to perform a carriage return, however the ENTER
>key is the hot key for this TSR, and I'd prefer not to change it.
>    I've tried using the basic output functions in C to do this, but they do
>work correctly.  Recently, I've discovered that using ALT 13, the carriage
>return ascii value, does perform a carriage return WITHOUT activating the TSR,
>so I'm wondering if anyone knows of a way, or some other, to simulate the  
>ALT 13 using a C or assembly routine.
>
>Any advice would be deeply appreciated.
>

What do you mean "perform a carriage return?"  I don't see why your TSR's
output conflicts with it's hot key.  Also what do you consider the "basic
output functions in C?"  ALT 13 is not an ASCII code.  And what does this
TSR do that you can use the ENTER key as the hot key for criminy's sake.
Are you sure you have all your definitions straight.

TSR       A program that upon exit leaves a portion of itself resident.  Code
          in the TSR is activated by some external event, often by a hot key
          but may be some other sort of system interupt.

Hot key   In the context of a TSR, a key that when pressed will cause the
          code in a TSR to be called to perform some function asynchronous
          to the currently running process.  An example is pressing ALT-C
          to cause a calculator program to overlay the current program
          without having to exit the first program.  Note that you should
          select a key that will not normally be used for other functions
          by DOS or other programs.  The ENTER key is definitely not a
          contendor for this honour.

In any case this is not a comp.lang.c question so note followup.

-- 
D'Arcy J.M. Cain (darcy@druid)     |   Government:
D'Arcy Cain Consulting             |   Organized crime with an attitude
West Hill, Ontario, Canada         |
(416) 281-6094                     |