home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpm / utils / sysutl / ykey21.lbr / YKEY20.DZC / YKEY20.DOC
Text File  |  1987-12-11  |  3KB  |  78 lines

  1.  
  2. YKEY20.DOC        12-04-87        R.Gaspari
  3.  
  4.     Yet another function key handler.   Source code enclosed.
  5.  
  6.     This is a different kind of function key processor.  It is designed 
  7. as an overlay onto a specific application program.  Once overlaid, it is 
  8. read into memory along with the application program at run time.  After
  9. program execution, it will remove itself during program termination.
  10.  
  11.     It will accept either of two types of function keys.  "Type 1" is
  12. defined as a single byte in the range 80h to FEh.  "Type 2" is defined
  13. as a two byte sequence of the form  ESCAPE-X  where X is any ascii
  14. character.  After trapping the function key, YKEY will replaces that 
  15. key with a specified fixed length replacement string.  The program is
  16. designed to look at contiguous bytes.  If your first function key is
  17. 80h (or ESC-^@), the replacement bytes for that key and for each successive
  18. key after that should be placed at KNMTBL.  If your first function key
  19. is greater, for example 0DBh (or ESC-[), the replacement bytes for that
  20. key and for each successive key after that should be placed at KFNTBL.
  21. Either or both may be used.  I use both.
  22.  
  23.     It must be tailored to each program onto which it is appended.
  24. Installation steps are discussed below.  To demonstrate the procedure
  25. a small library of examples is included for:  VDE26   IMP245  MBASIC
  26.  
  27.     Because it's part of the way I use this overlay, the code used for
  28. the resident pop-up clock display is added as part of the overlay.  
  29. It is designed to trap a "hot-key" and provide a continuous display of 
  30. the SMT no-slot clock time in the upper right hand corner of the crt screen.
  31.  
  32.  
  33.      ********************************************
  34.  
  35. INSTALLATION
  36.  
  37.     First, use DDT to examine the application program to be overlaid.
  38. Look at the size of the program and look at its first three bytes.
  39. Using VDE26 as an example, a DDT examination looks as follows:
  40. A>DDT  VDE.COM
  41.   Next PC
  42.   3100 0100                   ; 3100h is the end of the program
  43.   -d
  44.   0100  C3  80  04  ..  ..    ; the first three bytes are JMP 0480h
  45.  
  46.     
  47.     Second, edit the YKEY overlay.  Specify the end of the program.
  48. Specify the return to the original program (after YKEY is sent up
  49. into high memory).  Specify the hardware equates (TYPE1 & CLOCK).
  50. Specify your base address KBA.  I use either the bdos base or ccp;
  51. your bdos base address is the address at 0006h less 6 and can be
  52. determined using DDT and (d)isplaying the contents starting at addr
  53. 0000h.  Lastly, specify your choice of function key replacements.
  54.  
  55.  
  56.     Third, assemble the overlay file using Z80MR.COM (available in
  57. the public domain).
  58.  
  59.     Fourth and last, use DDT to overlay the resulting HEX file onto 
  60. the application program.  A sample session would be as follows:
  61.  
  62.     A>DDT VDE.COM
  63.     DDT VERS 2.2
  64.     NEXT  PC
  65.     3100 0100        (note again 3100 is the end of VDE.COM)
  66.     -Iykvde.hex        ("Insert" the HEX file into name buffer)
  67.     -R            (overlay the HEX file onto the COM file)
  68.     NEXT  PC
  69.     3480 0000        (note that the size has grown to 3480)
  70.     -^C            (return to CP/M)
  71.  
  72.     A>SAVE 52 VDE.COM    (now have a modified .COM file)
  73.  
  74.  
  75.     Send bug reports and comments to Russell Gaspari,
  76.     6656 W. 87th Place,  Los Angeles 90045.
  77.  
  78.