home *** CD-ROM | disk | FTP | other *** search
/ ftp.update.uu.se / ftp.update.uu.se.2014.03.zip / ftp.update.uu.se / pub / rainbow / msdos / decus / RB139 / rb-tsr.lzh / RB-TSR.DOC < prev   
Text File  |  1986-11-03  |  2KB  |  37 lines

  1.                              RB-TSR
  2.                          Booth Hartley
  3.  
  4.   A simple example of a memory resident utility on the Rainbow
  5.  
  6. After reading the article "Writing Desk Accessories" by Tom 
  7. Wadlow    in BYTE's special Fall 1985 issue on the IBM PC (Vol 10 
  8. Nbr 11),  I decided to see how hard it would be to convert such a 
  9. program to run on the Rainbow.  .  The program loads itself into 
  10. memory and changes the interrupt vector for BIOS keyboard input 
  11. to point to itself.  It then returns control to MSDOS with a 
  12. "Terminate and Stay Resident" (TSR) call (these memory resident 
  13. utilities are often called TSR's).  Henceforth, whenever DOS or a 
  14. program executes an interrupt to request a keyboard character, 
  15. the TSR gets control and can do whatever it wants.  For 
  16. demonstration purposes the program merely changes lower case z's 
  17. to upper case and vice-versa.  In modifying the code for the 
  18. Rainbow, no changes are required in the loading of the program as 
  19. a TSR or the changing of interrupt vectors.  That stuff is all 
  20. machine independent.  What does require changing is any interface 
  21. to the hardware or IBM BIOS.  In my version, I naturally wanted 
  22. to catch calls to the Rainbow firmware instead of the IBM BIOS.  
  23. Therefore, I intercepted a different interrupt number.  Since the 
  24. same Rainbow firmware interrupt is used for more than keyboard 
  25. input, it is necessary to look at the function code, and just 
  26. hand over other requests to the firmware.  An additional 
  27. complication is that the Rainbow maintains two input buffers 
  28. (level 1 and level 2) and the code must know about that.  All 
  29. this firmware stuff is documented in the MSDOS Technical 
  30. Documentation Set QV068-GZ.  
  31.  
  32. To build the executable program from the source file:
  33.  
  34. MASM RB-TSR;
  35. LINK RB-TSR;
  36. EXE2BIN RB-TSR RB-TSR.COM
  37.