home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / TURBOPAS / HELPPAT.DOC < prev    next >
Text File  |  2000-06-30  |  3KB  |  75 lines

  1. Below is a patch that causes Turbo Pascal (Z80 version) to automatically
  2. load  the  error message overlay file without asking the user first.  In
  3. essence, what happens is that Turbo displays the question (do  you  want
  4. to  load the message file), calls a subroutine to read the response, and
  5. stores the response.  The yes_or_no sbr returns a 0 if  the  answer  was
  6. 'N',  and  non-zero  (I  didn't check the exact value) if the answer was
  7. 'Y'.  Turbo then loads the message file if the zero flag is not set.
  8.  
  9. This patch overwrites the call to the "display string" function and  the
  10. start  of  the message.  It clears the A register, adds one to clear the
  11. zero flag, and branches past the call to yes_or_no.  If don't  you  want
  12. to load the error file, change the increment instruction to a no_op.
  13.  
  14. When the patched Turbo is run, the copyright message will  be  displayed
  15. until  the  error  file has been loaded, then it will display the "main"
  16. menu.  If the error file is not being loaded, the c-r  message  will  be
  17. displayed  briefly,  to  be  replaced  by the main menu.  Remember, this
  18. patch is for the Z-80 versions, but a similar patch is available for the
  19. IBM version.
  20.  
  21. NOTE: in the patches below, all user input is in lower case, and comments
  22.        to the user are in brackets [].
  23.  
  24. ------------------------------------------------------------
  25.  
  26.             Patch for Z-80 version 1.0
  27.  
  28. A>ddt turbo.com
  29. DDT VERS 2.2
  30. NEXT  PC
  31. 6F00 0100
  32. -d1e40,1e6f      [ display original code ]
  33. 1E40 6E 63 2E 0D 0A 0A 00 21 23 01 CD A5 01 CD F8 01 nc.....!#.......
  34. 1E50 0D 0A 0A 0A 49 6E 63 6C 75 64 65 20 65 72 72 6F ....Include erro
  35. 1E60 72 20 6D 65 73 73 61 67 65 73 00 CD 1F 29 32 6D r messages...)2m
  36. -a1e4d           [ enter patch in assembler ]
  37. 1E4D  sub a
  38. 1E4E  inr a      [ type NOP if you DON'T want the error file loaded ]
  39. 1E4F  jmp 1e6e
  40. 1E52  .          [ exit from assembler input mode ]
  41. -d1e40,1e6f      [ display patched code ]
  42. 1E40 6E 63 2E 0D 0A 0A 00 21 23 01 CD A5 01 97 3C C3 nc.....!#.......
  43. 1E50 6E E1 0A 0A 49 6E 63 6C 75 64 65 20 65 72 72 6F n...Include erro
  44. 1E60 72 20 6D 65 73 73 61 67 65 73 00 CD 1F 29 32 6D r messages...)2m
  45. -g0              [ exit from DDT ]
  46. A>save 110 turbo.com    [ save patched version ]
  47. A>
  48.  
  49. ------------------------------------------------------------
  50.  
  51.             Patch for Z-80 version 2.0
  52.  
  53. A>ddt turbo.com
  54. DDT VERS 2.2
  55. NEXT  PC
  56. 7800 0100
  57. -d2100,212f      [ display original code ]
  58. 2100 6C 3A 20 00 21 53 01 CD D0 01 CD 25 02 0D 0D 0A l: .!S.....!....
  59. 2110 0A 0A 49 6E 63 6C 75 64 65 20 65 72 72 6F 72 20 ..Include error 
  60. 2120 6D 65 73 73 61 67 65 73 00 CD 42 2c 32 24 44 C4 messages..B,2$D.
  61. -a210a           [ enter patch in assembler ]
  62. 210A  sub a
  63. 210B  inr a      [ type NOP if you DON'T want the error file loaded ]
  64. 210C  jmp 212c
  65. 210F  .          [ exit from assembler input mode ]
  66. -d2100,212f      [ display patched code ]
  67. 2100 6C 3A 20 00 21 53 01 CD D0 01 97 3C C3 2C 21 0A l: .!S.....<.,!.
  68. 2110 0A 0A 49 6E 63 6C 75 64 65 20 65 72 72 6F 72 20 ..Include error 
  69. 2120 6D 65 73 73 61 67 65 73 00 CD 42 2c 32 24 44 C4 messages..B,2$D.
  70. -g0              [ exit from DDT ]
  71. A>save 119 turbo.com    [ save patched version ]
  72. A>
  73.  
  74. ------------------------------------------------------------
  75.