home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / kaypro / kppatch.asm < prev    next >
Assembly Source File  |  1994-07-13  |  3KB  |  108 lines

  1. ;        KAYPRO LISTST BIOS PATCH
  2. ;            (KPPATCH.ASM)
  3. ;
  4. ;    The Kaypro IV has a bug in the BIOS function 14, LISTST.
  5. ; This bug causes the print buffer function in MDM7nn not to work
  6. ; properly. 
  7. ;    According to the DRI Alteration Guide, this function is
  8. ; supposed to return a value of 0FFH in register A if the printer
  9. ; is available, and 00 if it is busy. The Kaypro BIOS (which in
  10. ; turn calls the ROM) does not return the zero in A, but it does
  11. ; return with the zero FLAG set. This can be fixed by the BIOS
  12. ; patch which follows:
  13. ;
  14. ;
  15. BIOS    EQU    0FA00H    ; Beginning of BIOS jump vectors
  16. LISTST    EQU    BIOS + 165H
  17. ;
  18. BIOS14    EQU    BIOS + 3*14 + 3
  19. ;
  20.     ORG    BIOS14    ; Put jump to patch here
  21.     JMP    PATCH
  22. ;
  23. SPARE    EQU    BIOS - 18    ; Hole for patch
  24. ;
  25.     ORG    SPARE
  26. PATCH:    CALL    LISTST    ; Call the ROM
  27.     RNZ        ; OK except when zero
  28.     XRA    A    ; Clear accumulator
  29.     RET        ; And return
  30.     END
  31. ;
  32. ;
  33. ;     Since the bug is in the BIOS, the patch requires
  34. ; generating a new version and placing it in the system
  35. ; tracks of your disk. To accomplish this, take the
  36. ; following steps:
  37. ;
  38. ; (1) Assemble the code above using ASM or MAC. The
  39. ; output will be KPPATCH.HEX. Note that this file has all
  40. ; text commented out, so it should assemble without
  41. ; editing.
  42. ;
  43. ; (2) Use SYSGEN to get a copy of CP/M in memory.
  44. ; To do this, insert a disk containing both SYSGEN
  45. ; and DDT into drive A. Then type:
  46. ;
  47. ;    SYSGEN
  48. ;
  49. ; When SYSGEN prompts with
  50. ;
  51. ; SOURCE DRIVE NAME (OR RETURN TO SKIP),
  52. ;
  53. ; respond with an  A. This will cause SYSGEN to
  54. ; generate a copy of the system tracks in low RAM.
  55. ;
  56. ; (3) When SYSGEN prompts for the destination drive,
  57. ; answer with a RETURN to reboot. The CP/M copy will
  58. ; remain in RAM.
  59. ; (4) Save the copy of CP/M to disk by typing:
  60. ;
  61. ;    SAVE 36 CPM.COM
  62. ;
  63. ; (5) Type the following commands exactly as they
  64. ; appear:
  65. ;
  66. ;    DDT CPM.COM
  67. ;    IKPPATCH.HEX
  68. ;    R2580
  69. ;
  70. ; This causes DDT to load CPM.COM, then overlay it
  71. ; with the patches. The "2580" is the offset required
  72. ; to compensate for the fact that we are using a copy
  73. ; moved to low RAM. Just to be sure, type:
  74. ;
  75. ;    L1FAD
  76. ; and
  77. ;    L1F65
  78. ;
  79. ; You should see JMP F9EE at the first address, and
  80. ; the short subroutine at the second.
  81. ;
  82. ; (6) Exit DDT with G0 (that's a zero!) or ^C.
  83. ; The patched copy will remain in RAM.
  84. ;
  85. ; (7) Now run SYSGEN again. This time, respond to the
  86. ; first prompt with a RETURN (the system is already
  87. ; in RAM). At the second prompt, you can either respond
  88. ; with an "A", which will load the system onto the
  89. ; system tracks of the same disk, or "B" to load it onto
  90. ; any disk you desire to put in drive B.
  91. ;
  92. ; Note that you can continue to write the patched system
  93. ; onto as many disks as you like, simply by responding
  94. ; to the prompt appropriately. DO NOT type ^C when you
  95. ; insert a new disk!
  96. ;
  97. ; Note also that you can do this for existing disks. The
  98. ; contents of the directory or files on the disk will not
  99. ; be affected. Obviously, you might want to try this with
  100. ; a test disk, to make sure you get it right, before
  101. ; inserting the one with your PhD dissertation on it.
  102. ;
  103. ; If you experience any difficulties, please send me
  104. ; EMAIL at 72325,1327.
  105. ;
  106. ; Jack Crenshaw
  107.