[RC5] question/comment

Joe Zbiciak j-zbiciak1 at ti.com
Mon Mar 16 00:05:05 EST 1998


'Linux Fan' said previously:
 
| Last but not least, has anyone ever considered a TSR version for DOS
| machines?  I could dedicate a third machine if I could keep a BBS
| online. [...]

Actually, rather than modify the DOS client directly, how about just a
simple program that hooks the COM port's IRQ, and when it sees an
interrupt on that line (meaning, usually, a RING signal), it sends a
Ctrl-C to the current program.  This would avoid modifying the RC5
client by adding horribly platform-dependent code.

The program wouldn't need to be a TSR, per se.  Rather, it could start
up, hook interrupts, and then launch whatever program you wanted.  It'd
act as a wrapper in such a scenario.  When the client exits, the
wrapper quits also, thus unhooking IRQs so that the BBS can run unimpeded.
You could set the whole thing up in a short batchfile:

RC5BBS.BAT:

- - - -
:top

REM "ringwrap" is the proposed wrapper which waits for activity on a 
REM particular COM line and kills the client program with a Ctrl-C when 
REM it sees said activity.
ringwrap COM2 rc5.exe (...rc5 flags...)

REM "runbbs" is the BBS's executable
runbbs

goto top
- - - -


Such a wrapper could be used for more general purposes on DOS boxes
running BBS-type software.  And, depending on how fancy you want to
get, you could probably write the whole thing using DEBUG.  (Don't
laugh, I've written TSRs that way before!  Ok, so the whole TSR was
~~150 bytes, but it did hook two interrupts and perform a useful
function.)

The primary issue is how long it would take to kill off the DOS
client.  If it doesn't check for Ctrl-C often enough, then the BBS's
caller may be sitting there wondering why he isn't getting an answer
from the BBS.

Of course, if you're a true Linux afficianado, you could try running
the BBS under DOSemu in Linux.  ;-)   Or better still, port the BBS to
Linux.  (The latter is probably not possile unless you want to write
everything from scratch, including all of the doors, etc.)

Does anyone know how the DOS client currently detects Ctrl-C?  Does
it call the BIOS to query for keystrokes?  Does it call DOS?  Would
it be sufficient to just stuff a "Ctrl-C" into the keyboard buffer?

Regards,

--Joe

-- 
 +----------- Joseph Zbiciak ----------+
 | - - - -  j-zbiciak1 at ti.com  - - - - |       Ignorance is the
 |- http://www.primenet.com/~im14u2c/ -|       Mother of Devotion.
 | - - -Texas Instruments, Dallas- - - |          -- Robert Burton
 +-----#include "std_disclaimer.h"-----+
--
To unsubscribe, send 'unsubscribe rc5' to majordomo at lists.distributed.net
rc5-digest subscribers replace rc5 with rc5-digest



More information about the rc5 mailing list