home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / jsage / znode3 / uploads / myz80com.tzt / MYZ80COM.TXT
Encoding:
Text File  |  1993-06-07  |  3.5 KB  |  57 lines

  1.  
  2. Public Message # 5364  CPMTECH Area  Entered 16:39 Monday    22-Jun-92
  3. From:  SIMEON CRAN
  4.   To:  NICK GIBBS
  5.   Re:  Myz80...
  6.  
  7. Thanks for being such a happy customer!
  8.  Serial handling in MYZ80 goes like this:
  9.  You have direct access to the COM1 and COM2 ports on your PC via the Z80 i/o 
  10. instructions. As such you can write a polling routine to send and receive 
  11. characters. I have an overlay done for ZMP which works perfectly here, and you 
  12. are welcome to the source code (I will upload it to Z-Node 62 soon for all to 
  13. see).
  14.  Because MYZ80 is multi-tasker aware, it is always trying to work out when it 
  15. is safe to give up processing time to the host computer. When transferring 
  16. files, it is possible that MYZ80 will think it is OK to give up time, and your 
  17. communications program will end up not getting enough processing time, so will 
  18. drop characters. As such, in the loop where you poll the serial port, you must 
  19. (or rather should) make a special BIOS call to tell MYZ80 that the loop is 
  20. time critical. This doesn't matter on non-multitasking systems, but does 
  21. matter if a multitasker such as OS/2, Desqview or even Windows is running.
  22.  As I said, all works fine here, however I have 16550AFN UARTS rather than the 
  23. normal 8250 or 16450 UARTs, and I am running under OS/2, so I get the 
  24. advantage of fully buffered virtual UARTs: even though the Z80 program thinks 
  25. it is polling an 8250 UART, it is really polling a virtualised 8250, which 
  26. buffers data very safely.... characters don't get dropped.
  27.  For most simpler systems, though, the polling will have trouble keeping up 
  28. with the incoming data. The 8250 is a very basic device and has less buffering 
  29. than the Z80SIO or Z80DART. It is therefor much more susceptible to data 
  30. overrun. Really, it should only be operated with interrupts. I think Bruce 
  31. Dudley had it working ok on his 8MHz AT at 1200 baud. I can get 9600 and more 
  32. on my system (for the reasons explained above).
  33.  Getting MYZ80 to virtualise the interrupt so that it can handle higher baud 
  34. rates is not really practical, and would make overlay writing for Z80 comms 
  35. programs very difficult. My thinking is that if you want to do serious comms 
  36. work, use an OS/2 native program (or even a DOS program (is anyone still using 
  37. DOS???<g>)). You will get a much happier result. Failing that, put up with the 
  38. lower performance possible with a Z80 program, at a lower speed. Failing that: 
  39. convince me to give MYZ80 some sort of different serial comms support. One 
  40. thought has been to set up a serial interrupt handler and allow Z80 programs 
  41. to use it via an extended BIOS function.
  42.  But the more I think about this, the more I wonder why!
  43.  Give me some idea of your specific desires, and I will see what I can do. in 
  44. the meantime, you can have a play with the 8250 UARTS from Z80 code... The 
  45. 80286 i/o address 3f8h (COM1) is mapped to 00h Z80. And 2f8h (COM2) is mapped 
  46. to 08h Z80. So from 0-0fh is full control over the UARTs. Just use the Z80 in 
  47. and OUT instructions... they all work. Of course you are going to need to know 
  48. a little about the UARTs in order to program them. But you could try setting 
  49. their speeds with the DOS command MODE, then using IN and OUT in Z80 on the 
  50. base adresses (0 and 8) to read and write. It will get you started. And in the 
  51. meantime I will upload my overlay and you can study it for more ideas.
  52.  Hope that gets you going. 
  53. --- Foodo v0.9
  54.  * Origin: Z-Node 62 RCPM, Perth WA - v22bis - 61-9-450-0200 (FidoNet 
  55. 3:690/718)
  56.  
  57.