home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / next / programm / 7843 < prev    next >
Encoding:
Text File  |  1992-12-21  |  2.7 KB  |  57 lines

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!spool.mu.edu!sdd.hp.com!cs.utexas.edu!usc!sol.ctr.columbia.edu!news.unomaha.edu!slab.slip.uiuc.edu!derek
  3. From: derek@slab.slip.uiuc.edu (Derek Taubert)
  4. Subject: Re: 8 bits AND parity, please
  5. Message-ID: <1992Dec19.220522.2234@slab.slip.uiuc.edu>
  6. Reply-To: derek@slab.slip.uiuc.edu (Derek Taubert)
  7. Organization: Damage, inc.
  8. References: <1992Dec15.182315.6970@zetetic.uucp> <BzE0qx.559@nic.umass.edu> <1992Dec17.182417.28639@netcom.com> <BzFuCK.9G3@nic.umass.edu>
  9. Date: Sat, 19 Dec 1992 22:05:22 GMT
  10. Lines: 45
  11.  
  12. > of the hardware.  The DSP and serial ports are the easiest IMO to write drivers
  13. > for, as all you need is in header files hanging around on the system.
  14.  
  15. That WERE hanging around.  Read on...
  16.  
  17. > /usr/include/nextdev/zscom.h has the kernel entry points for a driver to
  18. > acquire and install interrupts for each of the serial ports. At driver open
  19. > you call zsacquire(0 or 1 (a or b), ZCUSER_LOADABLE, intrsw) with
  20. > intrsw filled in (see zscom.h) with a tx/rx and line state change interrupt
  21. > routine. 'chan' would be the device port (0 or 1).  and zsrelease is done
  22. > when the device is close'd.
  23. > /usr/include/nextdev/zsreg.h has all the defines you probably need for
  24. > accessing the 8530 hardware directly. ZSADDR_A = serial port A's hardware
  25. > registers. ZSADDR_B = serial port B's hardware registers. An 8530 manual
  26. > would be a must at this stage...  ZSREAD_A et al are handy macros for accessing
  27. > the hardware and such.
  28.  
  29. Great.  Except for one thing.  Under 3.0, zscom.h has disappeared, and zsreg.h
  30. has this to say:
  31.  
  32.  * 22-May-91  Gregg Kellogg (gk) at NeXT
  33.  *    Split out public interface.
  34.  
  35. No ZSADDR_A anywhere in all of /usr/include, no P_SCC in any of the cpu.h.
  36. Anybody have suggestions so that I don't have to set up all of the 2.x header
  37. files?  Thank you NeXT, for making it this much harder for me to hack into
  38. your kernel segments!!!  I would really like an ACCEPTABLE explanation for
  39. this from them.
  40.  
  41. struct zs_intrsw {              /* interrupt switch */
  42.         int (*zi_xint)(int chan);       /* transmitter interrupt routine */
  43.         int (*zi_rint)(int chan);       /* receiver interrupt routine */
  44.         int (*zi_sint)(int chan);       /* status change interrupt routine */
  45. };
  46.  
  47. I assume the interrupt routines are passed the SCC channel that generated them
  48. (same as unit in the zsacquire call?), but what to return from them?
  49.  
  50. > And disassembling the MIDI driver and kernel is a good idea for pointers...
  51.  
  52. Yup.  HAD I spoken to anybody at NeXT about this, they MIGHT just have said
  53. this as well (ahem).  Is there a 68040 disassembler shipped with NS, if not,
  54. where to get one?  I assume not, since no man page for 'dis'.
  55.  
  56. Derek
  57.