 Ŀ
 ۲ -=-=-= CyberRax Programming =-=-=- ۳
 ´
 Ŵ
 presents:Ŵ
 Ŵ
 Ŵ
 $$$$$$$$$$$$$$$$$$$$$$$$$$$Ŵ
 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$Ŵ
 $$$$$$$$$$$$$$$Ŵ
 $$$$$$$$$$$$$$$$Ŵ
 $$$$$$$$$$$$$$$Ŵ
 $$$$$$$$$$$$$$$$$$$$$Ŵ
 $$$$$$$$$$$$$$$$$$Ŵ
 $$$$$$$$$$$$$$$$$$Ŵ
 $$$$$$$$$$$$$$$$$$$$$$Ŵ
 $$$$$$$$$$$$$$$$$$$$$Ŵ
 $$$$$$$$Ŵ
 $$$$$$Ŵ
 Ŵ
 VERSION1.0Ŵ
 Ŵ
 Ŵ
 
  Introduction 
 ´
 
  jTSR  is  one  of  those  TSRs  which  have  been  designed by swiss-knife 
  principle: all you need in one small handy program.                        
 ´
 Ŵ
 Ŵ
 
  A little closer 
 ´
 
  jTSR is a memory resident program which allows you to:                     
                                                                             
   * blank the screen after specified  time  if  there's  been  no  keyboard 
     activity                                                                
   * blank the screen on hotkey                                              
   * prevent the filling of keyboard buffer with keystrokes                  
   * change PC speaker's annoying "BEEEEEEEP!" to nice "bl-bl-bl-bl"         
   * use numpad 5 as ESC or F3                                               
   * set the keyboard to maximum speed after specified number of keystrokes  
   * hide the mousecursor                                                    
   * fake a keystroke                                                        
   * release the environment of other TSRs                                   
   * disable output of other programs                                        
   * seed random data to NoiseSYS                                            
 ´
 Ŵ
 Ŵ
 
  Detailed 
 ´
 
  Automatic screen blanking  There's  a  well-known  danger by monitors: if 
  some  image  is  shown  for a  long time  then 
  it'll "burn in", so you can see it on the screen even when the monitor  is 
  turned off.    Screen  savers are meant to protect against that by showing 
  moving/changing images.  Blanker are a special case of savers  which  turn 
  the screen  dark  instead of showing anything.  This has the advantages of 
  less code and easier implementation.                                       
                                                                             
  Highlights of jTSR's blanker:                                              
   * should work on EGA systems                                              
   * the foreground program ain't affected in any way and keeps on running   
   * EVERY keystroke is detected thus the blanker works even under  programs 
     which grab the keyboard interrupt (like many games)                     
 Ĵ
  Screen blanking on hotkey  I don't know about you but I occasionally work 
  with  documents  which  I don't want others to 
  see.  And what to do if somebody walks in on those occasions?  The easiest 
  way is  to close the document and/or exit the word processor.  But what if 
  it's not a very fast computer and it's not possible to get  the  sensitive 
  stuff off the screen in 0,2 seconds?  What to do then?  Maybe turn off the 
  monitor?   Well,  that's  possible too, but then the person who stepped in 
  would notice that you're trying to hide something.    A  faster  and  more 
  secure way is to turn off the screen by software.  Many have had this idea 
  so  for  example  Symantec's  Norton Diskreet disk encryption system had a 
  hotkey to turn off the screen and also HyperWare's  HyperScreen  supported 
  this feature.    jTSR  supports blanking on hotkey because I find it handy 
  and it wasn't hard to modify the original code so  it  would  activate  on 
  hotkey.                                                                    
 Ĵ
  Filling prevention  Keyboards include a type-ahead buffer, which can hold 
  16 keystrokes.  If  you  hold  down  a  key  and  are 
  running  some  program  which performs some time consuming operation(s) by 
  this then the buffer will fill.  If it runs over your PC begins  to  beep. 
  This is  very  annoying.  One way to prevent this is to enlarge the buffer 
  so it could hold more keystrokes.  There are many  programs,  some  memory 
  resident, some not, which realize this idea, but this is incompatible with 
  a  number  of  programs  (including  one  called NC_EXIT which I happen to 
  use).  Another possibility, which is used in Indrek Pinsel's KBDSILNC,  is 
  to  emulate  a smaller buffer so in reality there would never be more than 
  16 strokes in the buffer.  It's a nice idea, but in reality not very  good 
  (or atleast  that  goes  for  mr.    Pinsel's implementation), because the 
  buffer still often runs over.    jTSR  uses  another  and  very  effective 
  method:  it  eliminates incoming keystrokes if there are already 16 in the 
  buffer.                                                                    
 Ĵ
  Bell intercept  The beep which is "played" through the PC speaker is used 
  to  signal  things  like  errors,  "ready"  status,  etc. 
  While basically a good thing it  can  be  quite  annoying,  especially  if 
  you've got  a  good (in other words LOUD) speaker.  Several programs exist 
  to fix this  problem.    For  example  Eric  Tauck's  Warp  Driver,  which 
  shorten's the  beep.    Or  MUTE  from  Vincent Penquerc'h which turns the 
  beeping completely off (but allows the playing of music).  What jTSR  does 
  is  to  turn  the  "beeeeep"  into  multiple  parts,  so  it  sounds  like 
  "bl-bl-bl-bl".  This is much more pleasant.                                
 Ĵ
  Numpad 5 to ESC/F3 conversion  If you tend to type numbers  on  the  main 
  keys  (those  under the function keys) and 
  don't  have  Num  Lock  on, then you don't use numpad 5. Other keys on the 
  numpad perhaps, but "5" has no other functions.  So why not turn  it  into 
  some key  which you do use?  Like ESC, which is (quite) often used and has 
  the bad habit to be situated in the very left corner.  Personally I  think 
  that  an  ESC  for  the right hand is a Good Thing. The possibility to use 
  num5 as F3 is specially for Volkov Commander 4.02+  users,  because  there 
  the  internal  viewer can be both activated and terminated through F3. You 
  can easily view through a large collection of ASCII  textfiles  with  your 
  right  hand and use the left one for making notes, holding the sandwich or 
  what ever.                                                                 
 Ĵ
  Setting keyboard to maximum speed  By default the keyboard ain't  working 
  on it's maximum speed.  Namely the key 
  repeat  count ain't as big as it can be and time that must pass before the 
  repeating starts ain't minimal.  While you probably won't notice  it  when 
  typing  some  text  it'll simply kill you if you are using the keyboard to 
  surf through your harddrive in a file manager  (atleast  it  kills  me  :) 
  It's  very  easy to set keyboard faster and many programs exist to do that 
  and most of them are non-resident.  So why this feature to jTSR?    I'm  a 
  dedicated  user  of  VAG's  and  OlegPro's DeGlucker 0.05, a very powerful 
  debugger, which has a nasty "feature" of setting the keyboard to a  slower 
  speed.   And as I'm too lazy to execute MODE (or FASTKEY) every time I use 
  DG then jTSR includes the speedup code.                                    
 Ĵ
  Mousecursor hiding  Now this should  be  something  original  (atleast  I 
  haven't  seen  it in any other program).  Perhaps I'm 
  the  only  one with this problem but I'm not a big fan of rodents (usually 
  referred to as "mice"). They certainly  are  valuable  when  dealing  with 
  graphics  (games, paint programs, etc.) but if you do most of your work in 
  textmode then the mousecursor is a very annoying thing: always sitting  on 
  the screen  and mostly in that spot where you the least want it to.  For a 
  long time I couldn't do anything about it, because I  simply  had  nothing 
  that would deal  with this problem.  Well, this ain't the case anymore.  I 
  can now simply make the mousecursor invisible.                             
 Ĵ
  Keystroke faking  Key faking/stuffing/stacking means that a keystroke  is 
  created  without  a  real  key  from the keyboard.  Key 
  fakers  basically  divide  into  two:  macro recorders, which allow you to 
  assign a series of keystroke to one key, and stuffers, which generate  the 
  keystrokes you  specify  on  the commandline.  Key stacking can be used to 
  automatically do, well, almost anything you  can  imagine.    The  stacker 
  included  in jTSR is a very simple one and allows you to push one key at a 
  time.  This of course can't compare with advanced stuffers, but  it's  not 
  supposed to.    I  need  exactly  one  faked keystroke and jTSR can handle 
  that.                                                                      
 Ĵ
  Releasing of environment  Many newer  memory  resident  programs  release 
  their  environment before going resident.  This 
  way you might save up to several hundred bytes of memory per TSR. This, as 
  you might have already thought, is also a Good thing.  The problem is that 
  most older TSRs don't behave this well.  You can force them to still do it 
  by using this feature of jTSR.                                             
 Ĵ
  Disabling video  This  feature  is meant as support for Joseph P. Morris' 
  OpenDOS  Loading  Screen  Toolkit.  While BLACKOUT,  the 
  heart of the package, disables effectively the output  of  device  drivers 
  which are being loaded in CONFIG.SYS it doesn't affect most programs which 
  are  run through AUTOEXEC.BAT and mess up the picture displayed by BANNER. 
  Using jTSR you can disable this messing.                                   
 Ĵ
  Seeding data to NoiseSYS  NoiseSYS by Robert  Walking-Owl  is  a  program 
  designed after Linux's /dev/random device and   
  can be  used  to  generate random garbage.  jTSR seeds some random data to 
  Noise for even more randomness.                                            
 ´
 Ŵ
 Ŵ
 
  Fore-story 
 ´
 
  I've used many different memory resident utilities over the time and  most 
  of them have been single-function only.  I didn't give any thought to this 
  until  I  found  a  program  called  5in1.  From  there  I got the idea of 
  incorporating several different actions into one  program.    So  I  began 
  throwing  away  TSRs  and  putting  the  code  which  I needed into my own 
  program.  By now it has even some functions which weren't in  any  of  the 
  originals and  yet  it  takes  a  lot less memory.  And this is very good, 
  because now I can stuff more utils into my system's UMBs.                  
 ´
 Ŵ
 Ŵ
 
  Usage 
 ´
 
  Simple:                                                                    
                                                                             
      jTSR <M[:keystrokes]> <S[:time]> <P:key[,keytime]> <other switches>    
                                                                             
  All switches are optional, may be preceded by  hypen  (-)  or  slash  (/), 
  aren't case sensitive and can be:                                          
                                                                             
  I        -  install  as  TSR.  This  means you can't simply doubleclick on 
              JTSR.COM and expect it to be resident, you must specify "I" on 
              the commandline                                                
  U        -  uninstall from memory.                                         
  E        -  enable TSR after it has been temporarily disabled              
  D        -  disable driver.  This switch can be useful  for  example  then 
              when      some      application     uses     Ctrl+Tilde     or 
              Ctrl+Alt+Numpad[Plus/Minus]  by  itself   but   doesn't   hook 
              interrupt 9.                                                   
  0        -  disable int  10h (BIOS) video.  If this is active then the TSR 
              will simply return by int10h calls without giving the  control 
              to code  which actually performs the graphics manipulations.   
  1        -  disable int 21h (DOS) video.  This switch disables functions 2 
              ("Write character to standard output") and 9 ("Write string to 
              standard output") of DOS interrupt 21h.                        
  5        -  turn numpad 5 into ESC.                                        
  L        -  don't let keyboard buffer fill.                                
  7        -  activate bell interception.                                    
  P        -  put key into buffer.                                           
                 Usage - P:key[,keytime].                                    
              Key means  the  key  which  to  generate.    Shift  keys   are 
              represented  by  S  for  Shift,  A  for Alt and C for Ctrl (so 
              "sf12" for Shift+F12  and  "cbackspace"  for  Ctrl+Backspace). 
              Shifted symbols like  "!"   can be entered either by "p:!"  or 
              "p:S1" (Shift+1). Multiple shift  keys  like  Ctrl+Alt  aren't 
              supported.   For  capital  letters  "s"  must be first letter, 
              otherwise a small letter is generated ("p:ss" fakes "S", while 
              "p:s" creates "s") Some keys have two strings associated  with 
              them:                                                          
                 PAGEUP & PGUP                                               
                 PAGEDOWN & PGDN                                             
                 ESCAPE & ESC                                                
                 RETURN & ENTER                                              
                 BACKSPACE & BSPACE                                          
                 PRTSC & PRINTSCREEN                                         
              Both are  accepted.  Instead of keys it's possible to give key 
              codes, ie the numeric codes which a keystroke generates.  They 
              can be given either in decimal, in which  case  they  must  be 
              preceded  by "d" (like "p:d283"), or in hex, by which "x" must 
              be in front of them ("p:x1BA")                                 
              Keytime is the number of seconds  which  to  wait  before  the 
              faking (this  is  known  as  delayed stuffing).  This time (if 
              given) must be in the range of 0 - 3600. If no time  is  given 
              then jTSR will wait 1 second.                                  
  Y        -  seed  samples  to  NoiseSYS.  This  is  by  default enabled if 
              NoiseSYS is detected and works by ordering Noise  to  add  the 
              time when a bell was played to the random number mixing        
  S        -  activate screen blanker.                                       
                 Usage - S[:time]                                            
              Time  means  the  number of minutes which must pass since last 
              keystroke before the blanker activates.  It  must  be  in  the 
              range  of  1  -  60.  If  no time is given then it is set to 7 
              minutes.                                                       
  C        -  hide mousecursor.  This option is usually enabled if a  rodent 
              is detected.    This  parameter activates only the hide/unhide 
              switching hotkey Ctrl+Alt+NumpadPlus.  To hide the cursor  you 
              must press it.  If you want to enable hiding then use "N".     
  B        -  blank on  hotkey.    Enables  the  blanking/unblanking  hotkey 
              Ctrl+Tilde ("~", is next to "1", above Tab)                    
  M        -  set keyboard to maximum speed.                                 
                 Usage - M[:keystrokes]                                      
              Keystrokes is the amount of keys after which the speedup  code 
              will activate.   This must be in the range of 1 - 127. If it's 
              not given then the value 25 is used.  Note  that  the  program 
              actually  uses  the  doubled  value,  because  both  press and 
              release of a key is considered a keystroke.                    
  H        -  halt CPU during blanking.  This executes the  machine  command 
              HLT when  blanking to cool the CPU off a bit.  I'm not sure it 
              has any real effect.                                           
  R        -  release environment of other TSRs. This feature is by  default 
              disabled.                                                      
  N        -  instantly hide mousecursor.  This switch is meant for hardcore 
              rodent  haters  like me who have the cursor hidden most of the 
              time.  By specifying "N" by loading I can skip  the  need  for 
              pressing the hotkey.                                           
  O        -  set  keyboard  instantly  to max speed without going resident. 
              Meant as an alternative to "MODE CON RATE=x DELAY=x"           
  53       -  turn numpad 5 into F3. Can be used in batch files to skip  the 
              pressing of Ctrl+Alt+NumMinus                                  
  Q        -  quiet mode.  Only errormessages are printed on screen.         
  F        -  force uninstallation.   Usually jTSR gives error if you try to 
              uninstall it and other  TSRs  are  detected  which  have  been 
              installed after  the utility on the same interrupts.  With "F" 
              you can force the uninstallation.  But be warned:  the  system 
              might become unstable or even crash after that.                
  NOERRER  -  no messages  on  errors.    If this and "Q" switch are present 
              then the program won't give any output what so ever.           
  DEFAULT  -  set all characteristics  to their default values.  The same as 
              "JTSR 0- 1- 5+ 7+ B+ L+ Y+ S:7 C+ M:25 H+ R- N-"               
                                                                             
  SWITCH and SWITCH+ are equal, use SWITCH- to reverse the action.           
                                                                             
  If no parameters are given then, if the utility is already resident,  it's 
  status is shown, otherwise the main help screen is presented.              
 ´
 Ŵ
 Ŵ
 
  System requirements 
 ´
 
  Really *required*:                                                         
                                                                             
      MS-DOS 2.0 (or compatible)                                            
      80286                                                                 
      about 15kB memory during execution, around 1430 bytes when resident   
                                                                             
  Optional:                                                                  
      mouse                                                                 
      Microsoft Mouse 1.0 compatible mousedriver                            
      enhanced keyboard with supporting BIOS                                
      NoiseSYS 0.5.3+                                                       
      PC speaker                                                            
      EGA or better video system                                            
 ´
 Ŵ
 Ŵ
 
  Tested 
 ´
 
  jTSR has been successfully tested on following configuration:              
                                                                             
    * Cyrix 486DLC/40MHz, MS-DOS 6.22, OAK VGA/monochrome monitor [mine]     
    * AMD  486DX/100MHz,  MS-DOS  6.22,  4DOS  6.00,  Cirrus SVGA/monochrome 
      monitor, NoiseSYS 0.6.3 beta, Arowana's Ice Mouse + CuteMouse 1.8 beta 
      8 as driver [mine]                                                     
    * AMD K6-2/300MHz, MSI-board, ELSA Erazor AGP 4MB, MS-DOS  7.10  (Win98) 
      [herinmi's]                                                            
    * Intel Celeron 466MHz, MS-DOS 7.10 (Win98) [A-Yee's]                    
 ´
 Ŵ
 Ŵ
 
  Known bugs and shortcomings 
 ´
 
  Shift  keys  (alts/ctrls/shifts)  tend to get stuck sometimes (in English: 
  computer acts as they would still be pushed down even  if  it's  not  so). 
  Pressing the key a second time fixes the problem.                          
                                                                             
  If  PreventKeybBufferFromFilling  is  enabled then pressing Alt+Fx+x under 
  Volkov Commander has the effect that Alt gets stuck and it seems that  the 
  keyboard is  locked.    This  ain't true and can be solved by pressing Alt 
  alone again.                                                               
                                                                             
  The keyboard won't be set to maximal speed if NumLock is active (to  avoid 
  a bug).                                                                    
                                                                             
  If  int10h  video  is  disabled when loading RADON Software's QCRT (tested 
  only with 2.1) then there might be some strange video effects with certain 
  programs (the only one I'm aware of is M. Hering's FileInfo).              
                                                                             
  Switching on and off mouse hiding  through  Ctrl+Alt+NumpadPlus  tends  to 
  crash occasionally.    But this might be the fault of my somewhat unstable 
  system (especially as the crashing seems to be random).                    
 ´
 Ŵ
 Ŵ
 
  Notes 
 ´
 
  About disabling video:                                                     
   * it doesn't mean that the screen is going to be dark or anything.   What 
     happens is that no new data is written to screen.                       
   * it has  effect  mostly  only  by  textmode  programs.   This means most 
     graphics programs won't be bothered by this TSR. The same goes for some 
     utilities which do work in textmode but employ other methods than using 
     DOS "write to screen" functions to put their stuff on the monitor (like 
     opening standard output as a file and writing to it).                   
   * it shouldn't be enabled during the start of a shell or file manager.    
                                                                             
  This  TSR  (and  most  others which have a hotkey) must be installed after 
  MS-DOS KEYB (in case you use it), because  KEYB  takes  over  interrupt  9 
  completely  and won't give control to handlers which were installed before 
  it . This *might* apply also to KEYB-clones (like the ones  included  with 
  other DOSs or distributed independently).                                  
 ´
 Ŵ
 Ŵ
 
  Technical about JTSR.COM 
 ´
 
  > My biggest project yet                                                   
  > Written in SPHINX/Sheker C-- and compiled with 0.237 beta 6              
  > Norton Commander Editor, MS-DOS Editor 2.0.026 and QEdit Advanced v3.00C 
    SW were used for writing                                                 
  > Super  Tracer 2.03/2.52, DeGlucker 0.05-VSL, Turbo Debugger 2.01/5.0 and 
    MS-DOS DEBUG were used for debugging                                     
  > HIEW 6.16 was used for examining the code                                
  > Lot of material from Interrupt List R60/R61, HelpPC 2.10 and  Tech  Help 
    4.0a was used                                                            
  > Source's size is 91080 bytes (it's fully commented, that's why)          
  > It has 2489 lines                                                        
  > It  should be possible to run a small country for a year or two with the 
    electricity spent on this code.  This might also apply  to the used food 
    and caffeine.                                                            
 ´
 Ŵ
 Ŵ
 
  History 
 ´
 
  For a complete development history (well, it's not so complete,  I  didn't 
  keep track of the changes from 1.0 to 1.0 beta 15) see JTSR.HST            
 ´
 Ŵ
 Ŵ
 
  Future 
 ´
 
  I  don't  think  that  I'm  going  to update this program soon, because it 
  provides almost everything I need.  But in case I do happen to  mess  with 
  the source of this TSR then following features might be added:             
     + indicator  when  floppy/harddrive has  completed  any  operation  (or 
       perhaps a  "disk  lamp"  (signalization of disk read/write actions on 
       screen), because I haven't  found  any  yet  which  would  completely 
       satisfy me)                                                           
     + hotkey  for  flushing  disk  caches (the code which I've come up with 
       this far tends to crash)                                              
     + disabling/releasing of other  TSRs (have  already  an  idea  but  the 
       corresponding code ain't working correctly)                           
     + some (maybe even all  :) of the bugs fixed                            
 ´
 Ŵ
 Ŵ
 
  Authors 
 ´
 
  This program is the work of several coders:                                
                                                                             
    Uwe Sieber      - filling-prevention                                     
    Yura Zaitsev    - bell interception and keyboard speedup                 
    Jem E. Berkes   - screen saver                                           
    Keith P. Graham - environment releasing                                  
    Morten Elling   - Num5 to ESC conversion                                 
    CyberRax        - main   executable,   mouse  hiding,  disabling  video, 
                      seeding samples to Noise, Num5 to  F3  conversion  (by 
                      modifying  Morten's routine to accept also F3) and all 
                      the bugs                                               
                                                                             
  I hope you guys aren't too mad about me shamelessly stealing your code. As 
  reward you may use any code piece I ever write and you are welcome to call 
  me the greatest lamer of all times  :)                                     
 ´
 Ŵ
 Ŵ
 
  Greets 
 ´
 
  Today's greets go out to:                                                  
                                                                             
  Uwe Sieber          -  author  of  5in1  TSR  (among  several  other  cool 
                         utilities).  I got the whole idea  for  my  program 
                         from your TSR.                                      
  Yura Zaitsev        -  author of YZTOOLS and a fellow Estonian (or atleast 
                         his  mailbox  was  in  1991  in Tallinn (capital of 
                         Estonia)). I was a dedicated fan of the YZ  package 
                         for a long time.                                    
  Jem E. Berkes       -  author    of   Blackout.   Probably   the   coolest 
                         screensaver I've ever seen.                         
  Keith P. Graham     -  author of Fix27.Com.                                
  Morten Elling       -  author of RHESC and NGX (free reader  and  compiler 
                         for Norton Guides). I'm a fan of both of them.      
  Robert Walking-Owl  -  author  of  NoiseSYS,  the  most interesting driver 
                         loaded on my system.                                
  Joseph P. Morris    -  author of OpenDOS Loading Screen  Toolkit.  As  you 
                         said: "One thing it [Win9x+] does have is a loading 
                         screen".   Well,  thanks  to  you the "it" can also 
                         mean DOS.                                           
  Dr. GJC Lokhorst    -  author  of  BLACKOUT.EXE,  a  device   driver   for 
                         suppressing the messages of other drivers.          
  Linkin Park         -  for  their  AWESOME album "Hybrid Theory" which has 
                         been plying a lot in  my CD player lately  and  has 
                         given   me   good   release    descriptions   (like 
                         PushingMeAway).                                     
 ´
 Ŵ
 Ŵ
 
  Validating 
 ´
 
  To  check if all files in this archive are OK store my public PGP key into 
  your public-key file (PGPK -a CYBERRAX.SIG), validate CRCHECK.CRC (PGP  -v 
  CRCHECK.CRC)  and  then  execute  ROSE SWE's CrCheck (which will check the 
  rest of the files).                                                        
 ´
 Ŵ
 Ŵ
 
  Closing 
 ´
 
  So, we have come to the end.  If you have any suggestions, thoughts or bug 
  reports or just want to point out some spelling error then  feel  free  to 
  mail me at                                                                 
                                                                             
                             cyberrax@yahoo.com                              
                                                                             
                                                                             
  Oh  yeah,  forgive  me my not so perfect English. For my defence I can say 
  that I've been up about 23 hours so I'm quite tired and  my  brains  ain't 
  doing  their  best job anymore (especially as I tend to sleep for about 10 
  of  the 24 hours, which means that I'll soon double the time I'm *usually* 
  awake).                                                                    
                                                                             
                                                                             
                                  CyberRax                                   
                               the Hacking One                               
                                     of                                      
                     -=-=-= CyberRax Programming =-=-=-                      
                                                                             
                   "does *anything* for more free memory"                    
                                                                             
                             December 6th, 2001                              
                   Tootsi, Parnu County, Estonia, Europe                     
 