home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / EDITRPAT.ZIP / EDITOR.PAT
Encoding:
Text File  |  1991-05-07  |  1.4 KB  |  42 lines

  1. File Description:
  2.   A patch for the EDITOR.PAS example shipped with Turbo Pascal 6.0.
  3.  
  4.  
  5. The following patch fixes the problem of not being able to enter
  6. numbers 3 thru 6 into the editor of the EDITORS.PAS example
  7. shipped with Turbo Pascal 6.0.
  8.  
  9. Open EDITORS.PAS in the TURBO editor and search for the EXISTING
  10. code.   Once that is found change the EXISTING code to the CHANGE
  11. TO code.  Save your changes and recompile EDITORS.PAS.
  12.  
  13.  
  14. EXISTING:                EXISTING:
  15.  
  16. LODSW                    var
  17. OR      BL,BL              Key: Word;
  18. JE      @@2
  19. CMP     BL,DL            CHANGE TO:
  20.  
  21. CHANGE TO:               var
  22.                            ShiftState: Byte absolute
  23. LODSW                        $40:$17;
  24. CMP     BL,DL              Key: Word;
  25.  
  26. ---------------------------------------------------
  27.  
  28. EXISTING:                EXISTING:
  29.  
  30. JE      @@4              begin
  31. @@2:    CMP     BH,DH      Key := Event.KeyCode;
  32. JE      @@4
  33.                          CHANGE TO:
  34. CHANGE TO:
  35.                          begin
  36. JE      @@4                if (ShiftState and $03 <> 0)
  37. CMP     BH,DH               and (Event.ScanCode >= $47)
  38. JE      @@4                  and (Event.ScanCode <= $51)
  39.                          then
  40. --------------------------   Event.CharCode := #0;
  41.                            Key := Event.KeyCode;
  42.