home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / cpm / 1502 < prev    next >
Encoding:
Text File  |  1992-12-21  |  6.9 KB  |  256 lines

  1. Newsgroups: comp.os.cpm
  2. Path: sparky!uunet!psinntp!blkbox!mknewman
  3. From: mknewman@blkbox (Marc Kraker Newman)
  4. Subject: Re: Kaypro II Video Problem
  5. Organization: The Black Box, PO Box 591822 Houston, TX 77259-1822 
  6. Date: Sun, 20 Dec 1992 22:02:34 GMT
  7. Message-ID: <1992Dec20.220234.12687@blkbox>
  8. References: <9212151234.AA10247@LL.MIT.EDU>
  9. Lines: 245
  10.  
  11. sage@LL.MIT.EDU (Jay Sage) writes:
  12.  
  13. >Several attempts to reply directly to "reynaert@arizona.edu" have failed with
  14. >a "user unknown" message from the host, so I will post my response here.
  15.  
  16. >>> I have benn having problems with my communications when I use an external
  17. >>> modem at 2400 BPS, Some characters are lost while the comunication is
  18. >>> going on. This only happens when there is output to my adm3a screen.
  19. >>> Curiously, this doesn't happen at 1200 BPS or less. Also I have down
  20. >>> loaded files at 2400 BPS and no data has been lost...
  21.  
  22. >   This is a very well known problem with Kaypro computers.  It is the
  23. >result of a poor design of the video display.  When a new line must be
  24. >created at the bottom of the screen and the existing lines have to be
  25. >scrolled up, the system takes so long that incoming characters are lost.  I
  26. >don't use a Kaypro myself, but many friends do.  There is a file that
  27. >implements a correction to this (I can't remember exactly what it does or
  28. >how it does it).  A common work around is to clear the screen every time it
  29. >fills up and to start again from the top.  If you don't get more specific
  30. >advice from others who reply to you, get back to me and I will try to dig up
  31. >that file for you.  It is posted on my BBS system, which is sponsored by the
  32. >former Kaypro User Group of the Boston Computer Society (now broadened to
  33. >include all CP/M and MS-DOS computers).  In case you are a BBSer, its phone
  34. >number is 617-965-7046.  This reaches first a v.32bis modem and, if that one
  35. >is busy, a USR Courier HST on line 2 (alternatively reachable directly at
  36. >617-965-7785).
  37.  
  38. >-- Jay Sage
  39.  
  40. Jay, this is not totally correct.  I ran a USRobotics HST/V32/V42bis on my 
  41. Kaypro 10 for several years, at 19200 baud, without problem.  I DID have to
  42. rewrite the overlay for BYE and Ybbat to do this though, as they were incorrectly handling the Z80-SIO fifo.  The SIO has a 4 character incomming FIFO, and it
  43. will allow you to do 19,200 (or maybe even 38400) without a hitch if you 
  44. implement a queue, and every time you go to get a character off the SIO, insteadget the chars off the SIO, and put them in the queue, and then return the top
  45. char off the queue.  I am going to include ybh-kay1.asm which implements this 
  46. at the end of this message.
  47.  
  48. Please note, most modem overlays such as bye, mex and others did not implement
  49. this.  Hope you can use it and hope it helps.  BTW, the queue I used is 256
  50. chars, if you need a bigger one (long interrupts blocking the sio for example
  51. during a disk read) then you will need to enlarge it.
  52.  
  53. Marc
  54.  
  55.  
  56.  
  57. ------------------------------------------------------------------------------
  58.  
  59.        ORG 0103H
  60.  
  61.        JMP TURD
  62.        JMP MODOUT
  63.        JMP MDOUTST
  64.        JMP MODINP
  65.        JMP MODSTAT
  66.        JMP PURGE
  67.        JMP CARCK
  68.        JMP DTRON
  69.        JMP DTROFF
  70.        JMP SET300
  71.        JMP SET1200
  72.        JMP SET2400
  73.        JMP SET9600
  74.        JMP SET19200
  75. MHZ    EQU 06H               ; 4 MEGAHERTZ
  76. PORT   EQU 04H               ; Data port
  77. MDCTL1 EQU PORT+2            ; Modem control port
  78. BRPORT EQU 0                 ; Baud rate port
  79. MDRCV  EQU 1                 ; Modem receive ready bit
  80. MDSND  EQU 4                 ; Modem CTS and Transmitter empty bits
  81. MDDCD  EQU 8                 ; Carrier detect
  82.  
  83. BD300  EQU 5                 ; 300 BAUD
  84. BD1200 EQU 7                 ; 1200 BAUD
  85. BD2400 EQU 10                ; 2400 BAUD
  86. BD9600 EQU 14                ; 9600 BAUD
  87. BD192K EQU 15                ; 19,200 BAUD
  88. ;
  89. ;       ORG 0150H              ; FOR MY KSMAIL
  90.        ORG  0A000H            ; FOR MY RECVMAIL
  91. TURD:
  92. ;       call 5f82H           ;FOR KSMAIL
  93.        CALL 51CCH            ;FOR RECVMAIL
  94.        nop
  95.        nop
  96.        lxi h,junk
  97.        push h
  98. ;       call 617fH
  99.        CALL  53CBH          ;FOR RECVMAIL
  100.        pop d
  101. ;
  102.        MVI A,0               ; Set up to write register 0
  103.        OUT MDCTL1
  104.        MVI A,18H             ; Reset channel
  105.        OUT MDCTL1
  106. ;
  107.        MVI A,4               ; Set up to write register 4
  108.        OUT MDCTL1
  109.        MVI A,044H              ; Set 16x, 1 stop bit, no parity
  110.        OUT MDCTL1
  111. ;
  112.        MVI A,3               ; Set up to write register 3
  113.        OUT MDCTL1
  114.        MVI A,0C1H            ; 8 bits, Rx enable
  115.        OUT MDCTL1
  116. ;
  117.        MVI A,5               ; Set up to write register 5
  118.        OUT MDCTL1
  119.        MVI A,0EAH            ; Turn DTR, RTS back on
  120.        OUT MDCTL1
  121. ;
  122.        LXI H,MHZ
  123.        RET
  124. ;
  125. JUNK:  DB 'Kaypro 1-2-4-10 I/O, USRobotics HST compatable (souped up!).'
  126.        DB  0dH,0aH,0aH,0
  127. ;
  128. MODOUT:
  129.        CALL MDOUTST
  130.        JZ   MODOUT
  131.        LXI  H,2
  132.        DAD  SP
  133.        MOV  A,M
  134.        OUT  PORT
  135.        MVI  A,5
  136.        OUT  MDCTL1
  137.        MVI  A,0EAH
  138.        OUT  MDCTL1
  139.        RET
  140. ;
  141. MDOUTST:
  142.        CALL CARCK           ; Turn RTS off while sending ONLINE only
  143.        JZ   MDOUTST1
  144.        MVI  A,0E8H
  145.        JMP  MDOUTST2
  146. MDOUTST1:
  147.        MVI  A,0EAH
  148. MDOUTST2:
  149.        PUSH PSW
  150.        MVI  A,5
  151.        OUT  MDCTL1
  152.        POP  PSW
  153.        OUT  MDCTL1
  154. ;
  155.        IN   MDCTL1           ; Get status
  156.        ANI  MDSND            ; TX ready must be high
  157. ;
  158.        MOV  L,A
  159.        MVI  H,0
  160.        RET
  161. ;
  162. MODINP:
  163.        CALL MODSTAT
  164.        JZ   MODINP
  165.        LXI  H,QUEUE
  166.        LDA  OUTPUT
  167.        INR  A
  168.        STA  OUTPUT
  169.        MOV  C,A
  170.        MVI  B,0
  171.        DAD  B
  172.        MOV  A,M
  173.        MOV  L,A
  174.        MVI  H,0
  175.        RET
  176. ;
  177. MODSTAT:
  178.        IN   MDCTL1              ; GET STATUS
  179.        ANI  MDRCV
  180.        JZ   MODSTAT1           ; NO CHARACTER, RETURN
  181.        LXI  H,QUEUE
  182.        LDA  INPUT
  183.        INR  A
  184.        STA  INPUT
  185.        MOV  C,A
  186.        MVI  B,0
  187.        DAD  B
  188.        IN   PORT
  189.        MOV  M,A                 ; STORE THE BYTE IN THE QUEUE
  190.        JMP  MODSTAT             ; SEE IF WE GOT ANOTHER WAITING
  191. MODSTAT1:
  192.        LDA  INPUT
  193.        LXI  H,OUTPUT
  194.        SUB  M
  195.        MOV  L,A
  196.        MVI  H,0
  197.        RET
  198. ;
  199. PURGE:
  200.        MVI  A,0
  201.        STA  INPUT
  202.        STA  OUTPUT
  203.        CALL MODSTAT
  204.        JNZ  PURGE
  205.        RET
  206.  
  207. DTRON: MVI  A,5
  208.        OUT  MDCTL1
  209.        MVI  A,0EAH
  210.        OUT  MDCTL1
  211.        RET
  212. ;
  213. DTROFF:MVI  A,5
  214.        OUT  MDCTL1
  215.        MVI  A,068H
  216.        OUT  MDCTL1
  217.        RET
  218. ;
  219. CARCK:
  220.        MVI  A,10H
  221.        OUT  MDCTL1
  222.        IN   MDCTL1           ; Get status
  223.        ANI  MDDCD
  224.        MOV  L,A
  225.        MVI  h,0
  226.        ret
  227. ;
  228. set300:mvi  a,bd300
  229.        jmp  setbaud
  230. ;
  231. set1200: mvi a,bd1200
  232.        jmp  setbaud
  233. ;
  234. set2400: mvi a,bd2400
  235.        jmp  setbaud
  236. ;
  237. set9600:mvi  a,bd9600
  238.         jmp  setbaud
  239. ;
  240. set19200:MVI  a,bd192k
  241. ;
  242. Setbaud:out BRPORT
  243.         LXI   H,0FFFFH
  244.         RET
  245. ;
  246. QUEUE:  DS    256
  247. INPUT:  DB    0
  248. OUTPUT: DB    0
  249. ;
  250.         END
  251. -- 
  252. Marc K. Newman (N5SLG)            Is UNIX pronounced 
  253. mknewman@blkbox.com             "UNIQUES" or
  254. PO BOX 591822                "EUNICHS"?
  255. Houston, Texas 77259-1822
  256.