home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / BYE5 / B5DC-1.INS < prev    next >
Text File  |  2000-06-30  |  2KB  |  104 lines

  1.  
  2. ; B5DC-1.INS - Hayes MM-100 insert for BYE5 - 07/17/85
  3. ;
  4. ;      D. C. Hayes MicroModem 100 Interface routines
  5. ;
  6. ; This version is for the D.C. Hayes MM100 and 80-103A modem cards.
  7. ; Note:  This is an insert, not an overlay.
  8. ;
  9. ;
  10. ; =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =
  11. ;
  12. ; 07/17/85  Written for use with BYE5        - Irv Hoff
  13. ;
  14. ; =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =
  15. ;
  16. ;
  17. ; Port equates
  18. ;
  19. PORT    EQU    80H        ; Modem data port
  20. MDCTL1    EQU    PORT+1        ; Status port and control port #1
  21. MDCTL2    EQU    PORT+2        ; Control port #2
  22. ;
  23. ;
  24. ;-----------------------------------------------------------------------
  25. ;
  26. ; See if we still have a carrier - if not, return with the zero flag set
  27. ;
  28. MDCARCK:IN    MDCTL1        ; Read port
  29.     ANI    40H        ; Carrier there?
  30.     RET
  31. ;.....
  32. ;
  33. ;
  34. ; Disconnect and wait for an incoming call
  35. ;
  36. MDINIT:    XRA    A        ; Drop carrier, if any
  37.     OUT    MDCTL2        ; Clear off-hook flag, turn off carrier
  38.     RET
  39. ;.....
  40. ;
  41. ;
  42. ; Input a character from the modem port
  43. ;
  44. MDINP:    IN    PORT        ; Get character
  45.     RET
  46. ;.....
  47. ;
  48. ;
  49. ; Check the satus to see if a character is available.  If not, return
  50. ; with the zero flag set.  If yes, use 0FFH to clear the flag.
  51. ;
  52. MDINST:    IN    MDCTL1        ; Get status
  53.     ANI    01H        ; Check the receive ready bit
  54.     RZ
  55.     ORI    0FFH
  56.     RET
  57. ;.....
  58. ;
  59. ;
  60. ; Send a character to the modem
  61. ;
  62. MDOUTP:    OUT    PORT        ; Send it
  63.     RET
  64. ;.....
  65. ;
  66. ;
  67. ; See if the output is ready for another character
  68. ;
  69. MDOUTST:IN    MDCTL1        ; Get status
  70.     ANI    02H        ; Check transmit ready bit
  71.     RET            ; Return with proper status
  72. ;.....
  73. ;
  74. ;
  75. ; Reinitialize the modem and hang up the phone by dropping DTR and
  76. ; leaving it inactive.
  77. ;
  78. MDQUIT:
  79. MDSTOP:    RET            ; Unused
  80. ;.....
  81. ;
  82. ;
  83. ; The following routine sets the baudrate.  BYE5 asks for the maximum
  84. ; speed you have available.
  85. ;
  86. SET1200    EQU    $        ; 1200 bps not supported
  87. SET2400    EQU    $        ; 2400 bps not supported
  88. ;
  89. SETINV:    ORI    0FFH        ; Make sure the Zero flag isn't set
  90.     RET
  91. ;.....
  92. ;
  93. ;
  94. SET300:    MVI    A,17H        ; 8 bits, no parity, 1 stop bit
  95.     OUT    MDCTL1
  96.     MVI    A,83H        ; 300 baud and answer phone
  97.     OUT    MDCTL2
  98.     XRA    A        ; Make sure Z is set
  99.     RET
  100. ;.....
  101. ;
  102. ;                   end
  103. ;-----------------------------------------------------------------------
  104.