home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / cpm / apple / apunspol.msg < prev    next >
Encoding:
Text File  |  1983-09-09  |  3.4 KB  |  73 lines

  1.  
  2. The unspool program by Gary P. Novosielski is a very useful routine,
  3. particularly for those with slow printers. Apple owners will never 
  4. get beyond the message "Error in system table" without a little added
  5. massage.  Gary aimed me in the right direction, any errors are mine.
  6.  
  7. The big problem is that standard CP/M 2.2 has ( & unspool expects) 16
  8. jump vectors st the start of BIOS, counting from the warm boot vector.
  9. Microsoft ("in their infinite wisdom")only saw fit to provide standard
  10. implementations for 14 of these.  Unspool uses number 15, LISTST:, which
  11. checks list device ready status, returning 00 in a if not ready, 0ffh
  12. in a if ready.  {Implementing vector 16 must wait for another day.}
  13.  
  14. First, Unspool must be modified to only expect 15 jumps.  At (about)
  15. line 104, NVECTS equ 16 must be changed from 16 to 15, so that Unspool
  16. will be happy with just 15 vectors.  
  17.  
  18. Next, you must add and implement vector No. 15.  This vector should be
  19. found at address 242dh in cpm56.com (or 0da2dh in 56k CP/M BIOS, or,
  20. according to my manual, at 0aa2dh in 44k CP/M BIOS; all future address
  21. references will be to the image in cpm56.com). Occupying that location
  22. now is [xor a, ret] af c9 00, which is a simulated and jumpless LISTST,
  23. always returning 00 in a.  At this address you will have to place a jump
  24. to where you will want to place LISTST; I would suggest 2483h as this
  25. location, hence use DDT to install c3 83 da.  Naturally, the jump address
  26. must be the actual CP/M address, not the address it occupies in 
  27. cpm56.com, that is da not 24 high-order byte. Note that all these changes
  28. in cpm56.com will be incorporated in CP/M by running cpm56.com, but 
  29. remember after this to reestablish any special items you have used
  30. CONFIGIO to install, such as printer drivers, keyboard redefinitions
  31. or undefinitions, terminal configurations, etc., as cpm56.com returns
  32. these all to their default values.
  33.  
  34. Finally you have to write your own LISTST code, and find a place to
  35. put it. The batches of 00's starting at 2433h are a series of 16
  36. byte disk parameter headers, 6 in all for disk drives a: through f:.
  37. If, like me, you will never need drive f:, you can use that location
  38. (16 bytes in length) for LISTST.  The location is 2483h through
  39. 2492h.  A LISTST (in z-80 code) for the CCS-7728 parallel printer
  40. card in slot 1 is given below, it is only 10 bytes (11 if you con-
  41. vert to 8080 code by changing the relative jump). Note that the 
  42. status code of the 7728 is exactly the opposite of that expected by
  43. LISTST, hence the xor a and cpl codes to get things right.
  44.  
  45.         ;This is a is a simple implementation of LISTST for the
  46.         ;ccs-7728 printer card in slot 1
  47.  
  48.                             .z80
  49.   E090                      status    equ    0e090h    ;status port, ccs-7728 
  50.                             ;in slot 1
  51.   0000'                     aseg
  52.                             org    0da83h        ;loc. of DPH for 
  53.                             ;drive f:
  54.   DA83    3A E090           ld    a,(status)    ;printer status to a
  55.   DA86    B7                or    a        ;set flags
  56.   DA87    28 02             jr    z,ready        ;if zero, jump to 
  57.                             ;next routine
  58.   DA89    AF                xor    a        ;set a to 00h, meaning 
  59.                             ;not ready
  60.   DA8A    C9                ret            ;and return
  61.   DA8B    2F            ready:    cpl            ;since a was 0, 
  62.                             ;complement = 0ffh
  63.   DA8C    C9                ret            ;a=ff shows lst: ready 
  64.                             ;for char.
  65.                             end    0da83h
  66.  
  67.  
  68. That's all there is to it, folks, sit back and enjoy printing while you
  69. compute!!
  70.  
  71. Bob Thompson
  72. Reply messages via Hyde Park or Calamity Cliffs RCPM, Chicago, please.
  73.