home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / jsage / znode3 / modem / i2vi-3.asm < prev    next >
Encoding:
Assembly Source File  |  1994-09-02  |  15.5 KB  |  544 lines

  1.  
  2. ; I2VI-3.ASM  -  Visual 1050 computer overlay for IMP  -  12/01/87
  3. ;
  4. ; =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =
  5. ;
  6. ; Interrupt vectors
  7. ;
  8. int$port    equ    0C0h
  9. int$initial    equ    010h
  10. int$mask    equ    1110$1111b    ; All on except VERT
  11. all$ints    equ    1111$1111b    ; All interrupts enabled
  12. vert$clear    equ    0A0h        ; Clear vert interrupt
  13. ;
  14. ; RS-232 8251
  15. ;
  16. p$aux1$data    equ 8Ch    ; rs-232 xmit/recv data
  17. p$aux1$control    equ 8Dh    ; rs-232 control/status
  18. ;
  19. ; Miscellaneous 8255
  20. p$printer    equ 91h    ; printer bits
  21. p$misc        equ 92h    ; miscellaneous bits
  22. p$8255$control    equ 93h    ; 8255 control port
  23. ;
  24. ;  Lpt masks
  25. ;
  26. misc$lpt$strobe    equ    0000$0001b    ; handshake strobe
  27. misc$lpt$avail    equ    0010$0000b    ; lpt available
  28. misc$lpt$nobusy    equ    0001$0000b    ; finished printing
  29. ; equates for mode byte bit fields
  30. ;
  31. mb$input        equ 0000$0001b    ; device may do input
  32. mb$output        equ 0000$0010b    ; device may do output
  33. mb$in$out        equ mb$input+mb$output
  34. ;
  35. mb$soft$baud        equ 0000$0100b    ; software selectable
  36. ;                    ; baud rates
  37. ;
  38. mb$serial        equ 0000$1000b    ; device may use protocol
  39. mb$xon$xoff        equ 0001$0000b    ; XON/XOFF protocol
  40. ;                    ; enabled
  41. ; port c base baud rate definitions
  42. ;
  43. misc$base01200    equ 0000$0000b  ; port c 1200 baud
  44. misc$base02400    equ 0000$0100b  ; port c 2400 baud
  45. misc$base19200    equ 0000$1000b  ; port c 19200 baud
  46. misc$base09600    equ 0000$1100b  ; port c 9600 baud
  47. misc$baudmask    equ 0000$1100b  ; mask for port c base baud rate
  48. mode$div16    equ 0000$0010b  ; 16x baud rate factor
  49. mode$div64    equ 0000$0011b  ; 64x baud rate factor
  50. ;
  51. baud$300    equ      misc$base01200 or mode$div64     ; 300 baud
  52. baud$600    equ      misc$base02400 or mode$div64     ; 600 baud
  53. baud$1200    equ      misc$base01200 or mode$div16     ; 1200 baud
  54. baud$2400    equ      misc$base02400 or mode$div16     ; 2400 baud
  55. baud$4800    equ      misc$base19200 or mode$div64     ; 4800 baud
  56. baud$9600    equ      misc$base09600 or mode$div16     ; 9600 baud
  57. baud$19200    equ      misc$base19200 or mode$div16     ; 19.2k baud
  58. ;
  59. ; 8251 Modes
  60. ;
  61. mode$s2            equ 1000$0000b  ; stop bit high
  62. mode$s1         equ 0100$0000b  ; stop bit low
  63. mode$ep            equ 0010$0000b  ; even parity
  64. mode$pen        equ 0001$0000b  ; parity enable
  65. mode$12         equ 0000$1000b  ; char length high
  66. mode$11         equ 0000$0100b  ; char length low
  67. mode$b2         equ 0000$0010b  ; baud rate factor high
  68. mode$b1        equ 0000$0001b  ; baud rate factor low
  69. com$eh        equ 1000$0000b  ; enter hunt mode
  70. com$ir        equ 0100$0000b  ; internal reset
  71. com$rts        equ 0010$0000b  ; request to send
  72. com$er        equ 0001$0000b  ; error reset
  73. com$sbrk    equ 0000$1000b  ; send break
  74. com$rxe        equ 0000$0100b  ; receive enable
  75. com$dtr        equ 0000$0010b  ; data terminal ready
  76. com$txe         equ 0000$0001b  ; transmit enable
  77. ;
  78. ; some common values
  79. ;
  80. mode$eight    equ 0000$1100b  ; eight data bits
  81. mode$onestop    equ 0100$0000b  ; one stop bit
  82. mode$baudmask    equ 0000$0011b  ; to get baud bits from port c
  83. mode$default       equ mode$onestop or mode$eight or mode$div16
  84.                                 ; one stop, eight data, no parity, 16x
  85. com$default    equ com$rts or com$rxe 
  86.                     ; request to send and receive enable
  87. ;
  88. ; Miscellaneous 8255
  89. lpt$mode0    equ 088H        ; Mode:A=0&OT, CH=IN, B=0&OT, c=OT
  90. lpt$baud    equ 0000$1100b  ; 1200 baud
  91. ;
  92. ;
  93. YES    EQU    0FFH
  94. NO    EQU    0
  95. ;
  96. PORT    EQU    08CH    ; Visual 8251A serial base port
  97. MDCTL1    EQU    PORT+1    ; Modem control port
  98. MDDATP    EQU    PORT    ; Modem data port
  99. MDRCV    EQU    02H    ; Modem receive ready
  100. MDSND    EQU    01H    ; Modem send ready bit
  101. MDTXE    EQU    05H    ; Modem send buffer empty, holding buffer empty
  102. ;
  103. BRPORT    EQU    92H    ; Port for setting baud rate
  104. ;
  105. MDMODE    EQU    82H    ; Insures 8251A is out of mode with DTR high
  106. MDRSET    EQU    42H    ; Resets USART for additional commands
  107. MDSET1    EQU    4EH    ; 1 stop bit, no parity, 8 bits, x16
  108. MDSET2    EQU    0CEH    ; 2 stop bits, no parity, 8 bits, x16
  109. MDCOM    EQU    37H    ; Reset error flags, RCV, DTR, TX ready
  110. ;
  111. ;
  112. ;-----------------------------------------------------------------------
  113. ;
  114. ESC    EQU    '['-40H    ; ^[ = Escape
  115. BELL    EQU    'G'-40H    ; ^G = Bell character
  116. LF    EQU    'J'-40H    ; ^J = Linefeed
  117. NEXTRY    EQU    'K'-40H    ; ^K = Try next phone number, abort this try
  118. CR    EQU    'M'-40H    ; ^M = Carriage return
  119. CLEARSC    EQU    'Z'-40H    ; ^Z = Clears screen, command mode only
  120. EOFCHAR    EQU    'Z'-40H    ; ^Z = End of file
  121. ;
  122. ;
  123. ;-----------------------------------------------------------------------
  124. ;
  125. ;
  126.     ORG    0100H
  127. ;
  128. ;
  129.     DS    3        ; Skip the data area below
  130. ;
  131. ;
  132. ; These routines and equates are at the beginning of the program so
  133. ; they can be patched by a monitor or overlay file without re-assembling
  134. ; the program.
  135. ;
  136. MSPEED:     DB    5    ; 0=110 1=300 2=450 3=600 4=710 5=1200        103H
  137.             ; 6=2400 7=4800 8=9600 9=19200 default
  138. HS2400:     DB    YES    ; Yes=2400 bps highest speed            104H
  139. HS1200:     DB    NO    ; Yes=1200 bps highest speed            105H
  140. RACAL:     DB    NO    ; Yes=Racal-Vadic 1200V or 2400V or 2400PA    106H
  141. PROMODM: DB    NO    ; Yes=Prometheus ProModem 1200 bps        107H
  142. RESVD1:     DB    NO    ; Reserved for special modems            108H
  143. RESVD2:     DB    NO    ; Reserved for special modems            109H
  144. ;
  145. ;
  146. CLEAR:     DB    0CH    ; Clear screen character (ESC not needed)    10AH
  147. CLOCK:     DB    40    ; Clock speed in MHz x10, 25.5 MHz max.     10BH
  148.             ; 20=2 MHh, 37=3.68 MHz, 40=4 MHz, etc.
  149. BYTDLY:     DB    2    ; 0=0 delay  1=10ms  5=50 ms - 9=90 ms        10CH
  150.             ;   default time to send character in ter-
  151.             ;   minal mode file transfer for slow BBS
  152. CRDLY:     DB    2    ; 0=0 delay 1=100 ms 5=500 ms - 9=900 ms    10DH
  153.             ;   default time for extra wait after CRLF
  154.             ;   in terminal mode file transfer
  155. NOFCOL:     DB    5    ; Number of directory columns shown        10EH
  156. TCHPUL:     DB    'P'    ; T=tone, P=Pulse (Hayes 2400 modems)        10FH
  157. ;.....
  158. ;
  159. ;
  160. ADDLFD:     DB    NO    ; Yes=add LF after CR to send file in terminal    110H
  161.             ;   mode (normally added by remote echo)
  162. CONVRUB: DB    YES    ; Yes=convert rub to backspace            111H
  163. CRCDFLT: DB    YES    ; Yes=default to CRC checking            112H
  164. IGNRCTL: DB    YES    ; Yes=CTL-chars above ^M not displayed        113H
  165. ;.....
  166. ;
  167. ;
  168. EXTCHR:     DB    '['-40H    ; ESC = preceeds local control character    114H
  169. EXITCHR: DB    'E'    ; Exit character                115H
  170. FILESND: DB    'F'    ; Send file when in terminal mode        116H
  171. NOCONCT: DB    'N'    ; Disconnect from phone line            117H
  172. LOGCHR:     DB    'L'    ; Send logon                    118H
  173. LSTCHR:     DB    'P'    ; Toggle printer                119H
  174. UNSAVCH: DB    'R'    ; Close input text buffer            11AH
  175. SAVECHR: DB    'Y'    ; Open input text buffer            11BH
  176. CLEARS:     DB    'Z'    ; Clears screen, terminal mode            11CH
  177. BRKCHR:     DB    'Q'    ; Send a break tone                11DH
  178. NODTR:     DB    NO    ; Yes if no DTR and need ATH0 to disconnect    11EH
  179. ;.....
  180. ;
  181. ;
  182. ; Handles in/out ports for data and status
  183. ;
  184. I$MDCTL1: IN    MDCTL1        ;                    11FH
  185.       RET            ; Spares if needed            121H
  186.       DB    0,0,0,0,0,0,0    ; Spares if needed            122H
  187. ;
  188. I$MDTXE:  IN    MDCTL1        ; (Needed for SIO or DART register 1    129H
  189.       RET            ;                    12BH
  190.       DB    0,0,0,0,0,0,0    ;                    12CH
  191. ;
  192. I$MDDATP: JMP    BDOS3        ;                    133H
  193.       DB    0,0,0,0        ;                    136H
  194.       DB    0,0,0        ;                    13AH
  195. ;
  196. O$MDDATP: JMP    BDOS4        ;                    13DH
  197.       DB    0,0,0,0        ; OUT modem data port            140H
  198.       DB    0,0,0        ; Spares if needed            144H
  199. ;.....
  200. ;
  201. ;
  202. A$MDRCV:  JMP    BDOS7        ;ANI    MDRCV                147H
  203.                   ;RET                    149H
  204. ;
  205. C$MDRCV:  JMP    BDOS7        ;CPI    MDRCV                14AH
  206.                   ;RET                    14CH
  207. ;
  208. A$MDSND:  JMP    BDOS8        ;ANI    MDSND                14DH
  209.                   ;RET                    14FH
  210. ;
  211. C$MDSND:  JMP    BDOS8        ;CPI    MDSND                150H
  212.                   ;RET                    152H
  213. ;
  214. A$MDTXE:  ANI    MDTXE        ;                    153H
  215.       RET            ;                    155H
  216. ;
  217. C$MDTXE:  CPI    MDTXE        ;                    156H
  218.       RET            ;                    158H
  219. ;.....
  220. ;
  221. ;
  222. ; Special exit vector, used by some computers to reset interrupt vectors
  223. ;
  224. J$EXITVEC:RET            ;                    159H
  225.       DB    0,0        ;                    15AH
  226. ;.....
  227. ;
  228. ;
  229. ; Jump vectors needed by each overlay
  230. ;
  231. J$GOODBYE:JMP    GOODBYE        ; Disconnects modem by dropping DTR    15CH
  232. J$INITMOD:JMP    INITMOD        ; Initializes modem, autosets baudrate    15FH
  233. J$STUPR:  JMP    STUPR        ; SET routine to change baudrate    162H
  234. J$SYSVR:  JMP    SYSVR        ; Signon message            165H
  235. ;.....
  236. ;
  237. ;
  238. ; "AT" command strings, can be replaced in individual overlay if needed
  239. ;
  240. J$STRNGA: DS    3        ; 1200 bps "AT" string            168H
  241. J$STRNG1: DS    3        ; 2400 bps "AT" string            16BH
  242. ;
  243. ;
  244. ; Next fourteen lines should not be changed by user overlay as these go
  245. ; to specific locations in the main program, not in the overlay.
  246. ;
  247. ;
  248. J$CMDSPL: DS    3        ; Allows entry of baudrate on CMD line    16EH
  249. J$CRLF:      DS    3        ; Turns up one new line on display    171H
  250. J$DIAL:      DS    3        ; Start of dialing routine        174H
  251. J$DSCONT: DS    3        ; Terminates modem use            177H
  252. J$GOLST:  DS    3        ; Printer routine, needed by Apple //e    17AH
  253. J$ILPRT:  DS    3        ; Prints an inline string, 0 to end    17DH
  254. J$INBUF:  DS    3        ; Stores a keybd string for comparison    180H
  255. J$INLNCP: DS    3        ; Inline "compare strings" routine    183H
  256. J$INMDM:  DS    3        ; Max .1 sec wait for modem character    186H
  257. J$RCVRSP: DS    3        ; For 3801 I/O use (TV-803)        189H
  258. J$SNDCHR: DS    3        ; Sends a character to the modem    18CH
  259. J$SNDSTR: DS    3        ; Sends a string to the modem, $ to end 18FH
  260. J$TIMER:  DS    3        ; .1 second timer (amount in 'B' reg.)    192H
  261. J$BREAK:  JMP    SENDBRK        ; Break routine             195H
  262. J$NEW2:      DB    0,0,0        ; For future needs            198H
  263. ;.....
  264. ;
  265. ;
  266. ; For 2400 bps auto-stepdown units
  267. ;
  268. MANUAL:      DB    0        ; For manual selection flag        19BH
  269. J$300:      JMP    OK300        ; Sets baudrate to 300 baud        19CH
  270. J$1200:      JMP    OK1200        ; Sets baudrate to 1200 bps        19FH
  271. J$2400:      JMP    OK2400        ; Sets baudrate to 2400 bps        1A2H
  272. ;.....
  273. ;
  274. ;
  275. LOGPTR:      DW    LOGON        ; Pointer to display LOGON message    1A5H
  276. ;
  277. SYSVR:      CALL    J$ILPRT        ; Display the following line        1A7H
  278.       DB    1bh,'[4m','Version for Visual 1050 Computer' ;        1AAH
  279.       DB    1bh,'[m',CR,LF,0
  280.       RET
  281. ;.....
  282. ;
  283. ;
  284. ;-----------------------------------------------------------------------
  285. ;
  286. ; NOTE:  You can change the SYSVER message to be longer or shorter.  The
  287. ;     end of your last routine should terminate by 0400H (601 bytes
  288. ;     available after start of SYSVER).
  289. ;
  290. ;-----------------------------------------------------------------------
  291. ;
  292. ; You can put in a message at this location which can be called up with
  293. ; (special character-L).  You can put in several lines.  End with a 0.
  294. ;
  295. LOGON:    DB    'Hello... ',CR,0
  296. ;.....
  297. ;
  298. ;
  299. ;-----------------------------------------------------------------------
  300. ;
  301. ; This routine sets a 300 ms break tone
  302. ;
  303. SENDBRK:
  304.     MVI    A,3FH        ; DTR normal, send break tone
  305.     JMP    GOODBYE+2
  306. ;.....
  307. ;
  308. ;
  309. ; This routine sets DTR low for 300 ms to disonnect the phone
  310. ;
  311. GOODBYE:
  312.     MVI    A,3DH        ; Send break, turn off DTR
  313.     CALL    SETMCTL        ; Send to status port
  314.     MVI    B,3        ; Delay 300 ms to hang up phone
  315.     CALL    J$TIMER
  316.     MVI    A,17h        ; Normal send/receive with DTR
  317.     CALL    SETMCTL        ; Send to status port
  318.     RET
  319. ;.....
  320. ;
  321. ;
  322. ; Visual initialization -- sets the 8251A for 8 bits, 1 stop pulse,
  323. ; DTR high, requires jumper to be set internally to 1200 baud then
  324. ; divides by 64 for 300, or by 16 for 1200 baud via "SET" command.  Set
  325. ; at present to default to 300 baud.
  326. ;
  327. INITMOD:MVI    A,3FH        ; Get byte to enable interrupts
  328.     OUT    09DH        ; Turn on interrupts
  329. ;
  330. ;
  331. ; The Visual 1050 provides a special function which returns the
  332. ; address of the byte where the BIOS keeps the current value of
  333. ; the modem control register.  We must modify this byte whenever
  334. ; we change the value of this register, or the BIOS will clobber
  335. ; it whenever it gets an interrupt from the modem port.
  336. ;
  337.     LXI    D,BIOSPB    ; Parameter block for BIOS call
  338.     MVI    C,50        ; Bdos function for direct BIOS call
  339.     CALL    5
  340.     SHLD    RSPAR        ; Save the returned address
  341.     RET
  342. ;
  343.     MVI    A,MDMODE    ; Insure 8251 is out of mode
  344.     OUT    MDCTL1
  345.     XTHL            ; Small delay to complete command
  346.     XTHL
  347.     MVI    A,MDRSET    ; Reset the 8251A for new command
  348.     OUT    MDCTL1
  349.     XTHL            ; Small delay to complete command
  350.     XTHL
  351.     MVI    A,MDSET1    ; Set stop pulse, no parity 8 bits, x16
  352.     OUT    MDCTL1
  353.     XTHL            ; Small delay to complete command
  354.     XTHL
  355.     MVI    A,MDCOM        ; Error reset, RCV, DTR, TX ready
  356.     OUT    MDCTL1
  357.     XTHL            ; Small delay to complete command
  358.     XTHL
  359. ;
  360.     LDA    MSPEED        ; Get the selected value
  361.     CPI    1        ; 300 bps
  362.     JZ    OK300
  363.     CPI    5        ; 1200 bps
  364.     JZ    OK1200
  365.     CPI    6        ; 2400 bps
  366.     JZ    OK2400
  367.     CPI    8        ; 9600 bps
  368.     JZ    OK9600
  369.     JMP    STUPR1        ; Else ask what is wanted
  370. ;.....
  371. ;
  372. ;
  373. STUPR:    CALL    J$CMDSPL    ; Gives us CMDBUF+6
  374.     JNC    STUPR2
  375. ;
  376. STUPR1:    CALL    J$ILPRT
  377.     DB    'Input Baud Rate (300, 1200, 2400, 9600, 19200): ',0
  378.     LXI    D,BAUDBUF    ; Point to new input buffer
  379.     CALL    J$INBUF
  380.     CALL    J$CRLF
  381.     LXI    D,BAUDBUF+2
  382. ;
  383. STUPR2:    CALL    J$INLNCP    ; Compare BAUDBUF+2 with chars. below
  384.     DB    '300',0
  385.     JNC    OK300        ; Go if got match
  386.     CALL    J$INLNCP
  387.     DB    '1200',0
  388.     JNC    OK1200
  389.     CALL    J$INLNCP
  390.     DB    '2400',0
  391.     JNC    OK2400
  392.     CALL    J$INLNCP
  393.     DB    '9600',0
  394.     JNC    OK9600
  395.     CALL    J$INLNCP
  396.     DB    '19200',0
  397.     JNC    OK19200
  398.     CALL    J$ILPRT        ; All matches failed, tell operator
  399.     DB    '++ Incorrect entry ++',CR,LF,BELL,CR,LF,0
  400.     JMP    STUPR1        ; Try again
  401. ;
  402. OK300:    MVI    A,1        ; MSPEED 300 baud value
  403.     LXI    H,BD300        ; Get 300 bps parameters in 'HL'
  404.     JMP    LOADBD        ; Go load them
  405. ;
  406. OK1200:    MVI    A,5
  407.     LXI    H,BD1200
  408.     JMP    LOADBD
  409. ;
  410. OK2400:    XRA    A
  411.     STA    MANUAL        ; Reset to maximum auto-speed
  412.     MVI    A,6
  413.     LXI    H,BD2400
  414.     JMP    LOADBD
  415. ;
  416. OK9600:    MVI    A,8
  417.     LXI    H,BD9600
  418.     JMP    LOADBD
  419. ;
  420. OK19200:MVI    A,9
  421.     LXI    H,BD19200
  422. ;
  423. LOADBD:    STA    MSPEED        ; Change time-to-send to match baud rate
  424.     MOV    A,L        ; Get baudrate byte
  425.     STA    LOAD1+1        ; Send to timer for new baudrate
  426.     MOV    A,H
  427.     OUT    MDCTL1        ; Modem status port (mode word)
  428.     MVI    A,17h        ;MDCOM         DTR, RCV, XMT, error reset
  429.     CALL    SETMCTL        ; Modem status port
  430.     IN    BRPORT        ; Get what was there
  431.     ANI    0F3H        ; Clear out the old baud rates
  432. ;
  433. LOAD1:    ORI    0        ; Set new baudrate
  434.     OUT    BRPORT        ; New baud rate now set
  435.     RET
  436. ;.....
  437. ;
  438. ;
  439. ; Table of baudrate parameters
  440. ;
  441. BD300    EQU    baud$300    ;4F00H         4F divides by 64
  442. BD1200    EQU    baud$1200    ;4E00H         4E divides by 16
  443. BD2400    EQU    baud$2400    ;4E04H
  444. BD9600    EQU    baud$9600    ;4E08H
  445. BD19200    EQU    baud$19200    ;4E10H
  446. ;
  447. BAUDBUF:DB    10,0,0,0,0,0
  448.     DB    0,0,0,0,0,0
  449. ;.....
  450. ;
  451. ;
  452. BIOSPB:    DB    30,3
  453. ;.....
  454. ;
  455. ;
  456. ; The following routines replace direct modem port I/O with BDOS calls.
  457. ; The Visual 1050 BIOS uses interrupt-driven I/O with ring buffers.
  458. ; This solves the problem of losing modem input while the console dis-
  459. ; play does a carriage return.
  460. ;
  461. ; Check for input character (receive ready)
  462. ;
  463. BDOS7:    PUSH    B        ; Save the registers
  464.     MVI    C,7        ; Bdos function number
  465.     JMP    BDOS78        ; Common routine for BDOS 7 and 8
  466. ;.....
  467. ;
  468. ;
  469. ; Check for output character (send ready)
  470. ;
  471. BDOS8:    PUSH    B        ; Save the registers
  472.     MVI    C,8        ; BDOS function number
  473. ;
  474. BDOS78:    PUSH    D
  475.     PUSH    H
  476.     CALL    5
  477.     POP    H        ; Restore the registers
  478.     POP    D
  479.     POP    B
  480.     ORA    A        ; BDOS returns A=0 if not ready
  481.     JZ    CLRZ        ; Return Z flag off if not ready
  482.     XRA    A        ; Set Z flag if ready
  483.     RET
  484. ;
  485. CLRZ:    INR    A        ; Clear Z flag (make a non-zero)
  486.     RET
  487. ;.....
  488. ;
  489. ;
  490. ; Input a character from modem via BIOS ring buffer
  491. ;
  492. BDOS3:    PUSH    B        ; Save the registers
  493.     PUSH    D
  494.     PUSH    H
  495.     MVI    C,3        ; Bdos function number
  496.     CALL    5
  497.     POP    H        ; Restore the registers
  498.     POP    D
  499.     POP    B
  500.     RET            ; Input character is in a
  501. ;.....
  502. ;
  503. ;
  504. ; Ouput a character to modem via BIOS ring buffer
  505. ;
  506. BDOS4:    PUSH    B        ; Save the registers
  507.     PUSH    D
  508.     PUSH    H
  509.     MVI    C,4        ; BDOS function number
  510.     MOV    E,A        ; Character to output must be in 'E'
  511.     CALL    5
  512.     POP    H        ; Restore the registers
  513.     POP    D
  514.     POP    B
  515.     RET
  516. ;.....
  517. ;
  518. ;
  519. ; The Visual 1050 BIOS keeps the current value of the modem control
  520. ; register in a special byte.  We must modify this byte whenever
  521. ; we change the value of this register, or the BIOS will clobber
  522. ; it whenever it gets an interrupt from the modem port.
  523. ;
  524. SETMCTL:PUSH    H
  525.     LHLD    RSPAR        ; Address of BIOS byte
  526.     MOV    M,A        ; Save new value there
  527.     OUT    MDCTL1        ; Output to modem control register
  528.     POP    H
  529.     RET
  530. ;.....
  531. ;
  532. ;
  533. RSPAR:    DS    2        ; Addr of BIOS copy of modem control reg
  534. ;.....
  535. ;
  536. ;                   end
  537. ;-----------------------------------------------------------------------
  538. ;
  539. ; NOTE: Must terminate by 0400H
  540. ;
  541.     END
  542.  
  543.  
  544.