home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / simtel / sigm / vols200 / vol273 / i2ov-2.asm < prev    next >
Encoding:
Assembly Source File  |  1994-07-13  |  15.8 KB  |  538 lines

  1.  
  2. ; I2OV-2.ASM - Osborne Vixen/OCC4 overlay file for IMP - 08/07/85
  3. ;
  4. ;        8251A IO and 8155 baudrate generator
  5. ;
  6. ; The Osborne Vixen/OCC4 requires that pin 5 on its serial port be con-
  7. ; nected to an RS-232 pin which has a "SPACE" signal present.  This sig-
  8. ; nal can be found on most RS-232 modems as pin 5 (CLEAR TO SEND - CTS).
  9. ; The Vixen is already wired as "DCE" not "DTE", so no cross-wiring from
  10. ; 2 and 3 is needed as in most computers.  The cable between the Vixen
  11. ; OCC4 and your modem should contain the following.  The optional wire
  12. ; is not needed for use with IMP, but would be needed if used with BYE3
  13. ; for RCPM use:
  14. ;
  15. ;           VIXEN          MODEM
  16. ;         2 ------------ 2    TXD data out
  17. ;         3 ------------ 3    RXD data in
  18. ;         5 ------------ 5    CTS, required
  19. ;         6 ------------ 8    (*)
  20. ;         7 ------------ 7    ground
  21. ;        20 ------------ 20    DTR
  22. ;
  23. ;    (*) Required for BYE3 or BYE5, unnecessary otherwise
  24. ;
  25. ;-----------------------------------------------------------------------
  26. ;
  27. ; Edit this file for your preferences then follow the "TO USE:" example
  28. ; shown below.
  29. ;
  30. ; Many terminals will clear the screen with a CTL-Z.  If yours does, put
  31. ; a 1AH at CLEAR: (010AH).  Many terminals use two characters, the first
  32. ; normally an ESC.  For example, ESC *.  In this case put '*' at CLEAR:
  33. ; (The ESC will automatically be typed with no CTL-character present.)
  34. ; If you don't know what your terminal uses, put a 0 at CLEAR: and IMP
  35. ; will scroll up 24 blank lines to clear the CRT for things like MENU,
  36. ; looking at the function key table, typing CTL-Z in command mode, etc.
  37. ;
  38. ; Use the "SET" command to change the baudrate when desired.  The value
  39. ; at MSPEED controls the baudrate when the program is first called up.
  40. ;
  41. ;    TO USE: First edit this file filling in answers for your own
  42. ;        equipment.  Then assemble with ASM.COM or equivalent
  43. ;        assembler.  Then use MLOAD to merge into the main file:
  44. ;
  45. ;        MLOAD IMP.COM=IMP.COM,I2DP-x.HEX
  46. ;
  47. ; =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =
  48. ;
  49. ; 08/07/85  Diagram clarified, no other change    - Roy Robinson
  50. ; 07/17/85  Adapted for use with IMP        - Irv Hoff
  51. ; 02/10/85  Modified for Osborne Vixen/OCC-4    - Roy Robinson
  52. ;
  53. ; =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =
  54. ;
  55. ;
  56. YES    EQU    0FFH
  57. NO    EQU    0
  58. ;
  59. ;
  60. ; Values shown are for a 8251A
  61. ;
  62. PORT    EQU    30H    ; Your base port (data or status)
  63. MDCTL1    EQU    PORT+1    ; Modem control port
  64. MDDATP    EQU    PORT    ; Modem data port
  65. MDRCV    EQU    02H    ; Modem receive ready
  66. MDSND    EQU    01H    ; Modem send ready bit
  67. MDTXE    EQU    05H    ; Modem send buffer empty, holding buffer empty
  68. ;
  69. MDMODE    EQU    82H    ; Insures 8251 is out of mode with DTR high
  70. MDRSET    EQU    42H    ; Resets USART for additional commands
  71. MDSET1    EQU    4EH    ; 1 stop bit, no parity, 8 bits, x16
  72. MDSET2    EQU    0CEH    ; 2 stop bits, no parity, 8 bits, x16
  73. MDCOM    EQU    37H    ; Reset error flags, RTS, Rxd, DTR, Txd on
  74. ;
  75. AJUMP    EQU    0C3H    ; JUMP instruction opcode
  76. BDOS    EQU    0005H    ; Address of BDOS entry point in 1st page of RAM
  77. BIOS    EQU    0001H    ; Pntr address of CP/M warm boot jump in BIOS
  78. EXITCPM    EQU    2C80H    ; Address of CP/M warm boot jump in EXIT routine
  79. INTVEC    EQU    0EFFEH    ; Address of interrupt vector to first interrupt
  80.             ;   service routine
  81. ;
  82. ;-----------------------------------------------------------------------
  83. ;
  84. ESC    EQU    '['-40H    ; ^[ = Escape
  85. BELL    EQU    'G'-40H    ; ^G = Bell character
  86. LF    EQU    'J'-40H    ; ^J = Linefeed
  87. NEXTRY    EQU    'K'-40H    ; ^K = Try next phone number, abort this try
  88. CR    EQU    'M'-40H    ; ^M = Carriage return
  89. CLEARSC    EQU    'Z'-40H    ; ^Z = Clears screen, command mode only
  90. EOFCHAR    EQU    'Z'-40H    ; ^Z = End of file
  91. ;
  92. ;
  93. ;-----------------------------------------------------------------------
  94. ;
  95. ;
  96.     ORG    0100H
  97. ;
  98. ;
  99.     DS    3    ; Skip the data area below
  100. ;
  101. ;
  102. ; These routines and equates are at the beginning of the program so
  103. ; they can be patched by a monitor or overlay file without re-assembling
  104. ; the program.
  105. ;
  106. MSPEED:     DB    6    ; 0=110 1=300 2=450 3=600 4=710 5=1200        103H
  107.             ; 6=2400 7=4800 8=9600 9=19200 default
  108. HS2400:     DB    YES    ; Yes=2400 bps highest speed            104H
  109. HS1200:     DB    NO    ; Yes=1200 bps highest speed            105H
  110. RACAL:     DB    NO    ; Yes=Racal-Vadic 1200V or 2400V or 2400PA    106H
  111. PROMODM: DB    NO    ; Yes=Prometheus ProModem 1200 bps        107H
  112. RESVD1:     DB    NO    ; Reserved for special modems            108H
  113. RESVD2:     DB    NO    ; Reserved for special modems            109H
  114. ;
  115. ;
  116. CLEAR:     DB    1AH    ; Clear screen character (ESC not needed)    10AH
  117. CLOCK:     DB    40    ; Clock speed in MHz x10, 25.5 MHz max.     10BH
  118.             ; 20=2 MHh, 37=3.68 MHz, 40=4 MHz, etc.
  119. BYTDLY:     DB    2    ; 0=0 delay  1=10ms  5=50 ms - 9=90 ms        10CH
  120.             ;   default time to send character in ter-
  121.             ;   minal mode file transfer for slow BBS
  122. CRDLY:     DB    2    ; 0=0 delay 1=100 ms 5=500 ms - 9=900 ms    10DH
  123.             ;   default time for extra wait after CRLF
  124.             ;   in terminal mode file transfer
  125. NOFCOL:     DB    5    ; Number of directory columns shown        10EH
  126. TCHPUL:     DB    'T'    ; T=tone, P=Pulse (Hayes 2400 modems)        10FH
  127. ;.....
  128. ;
  129. ;
  130. ADDLFD:     DB    NO    ; Yes=add LF after CR to send file in terminal    110H
  131.             ;   mode (normally added by remote echo)
  132. CONVRUB: DB    YES    ; Yes=convert rub to backspace            111H
  133. CRCDFLT: DB    YES    ; Yes=default to CRC checking            112H
  134. IGNRCTL: DB    NO    ; Yes=CTL-chars above ^M not displayed        113H
  135. ;.....
  136. ;
  137. ;
  138. EXTCHR:     DB    '['-40H    ; ESC = preceeds local control character    114H
  139. EXITCHR: DB    'E'    ; Exit character                115H
  140. FILESND: DB    'F'    ; Send file when in terminal mode        116H
  141. NOCONCT: DB    'N'    ; Disconnect from phone line            117H
  142. LOGCHR:     DB    'L'    ; Send logon                    118H
  143. LSTCHR:     DB    'P'    ; Toggle printer                119H
  144. UNSAVCH: DB    'R'    ; Close input text buffer            11AH
  145. SAVECHR: DB    'Y'    ; Open input text buffer            11BH
  146. CLEARS:     DB    'Z'    ; Clears screen, terminal mode            11CH
  147. SPARE1:     DB    0    ; For future development            11DH
  148. SPARE2:     DB    0    ; For future development            11EH
  149. ;.....
  150. ;
  151. ;
  152. ; Handles in/out ports for data and status
  153. ;
  154. I$MDCTL1: DI            ;                    11FH
  155.       IN    MDCTL1        ;                    120H
  156.       EI            ;                    122H
  157.       RET            ; IN modem control port         123H
  158.       DB    0,0,0,0,0    ; Spares if needed            124H
  159. ;
  160. I$MDTXE:  DI            ;                    129H
  161.  
  162.       IN    MDCTL1        ; (Needed for SIO or DART register 1    12AH
  163.       EI            ;                    12CH
  164.       RET            ;                    12DH
  165.       DB    0,0,0,0,0    ;                    12EH
  166. ;
  167. I$MDDATP: DI            ;                    13DH
  168.       IN    MDDATP        ;                    13EH
  169.       EI            ;                    140H
  170.       RET            ;                    141H
  171.       DB    0,0,0,0,0    ; Spares if needed            142H
  172. ;
  173. O$MDDATP: EI
  174.       OUT    MDDATP        ;                    147H
  175.       DI
  176.       RET            ; OUT modem data port            149H
  177.       DB    0,0,0,0,0    ; Spares if needed            14AH
  178. ;.....
  179. ;
  180. ;
  181. A$MDRCV:  ANI    MDRCV        ;                    147H
  182.       RET            ;                    149H
  183. ;
  184. C$MDRCV:  CPI    MDRCV        ;                    14AH
  185.       RET            ;                    14CH
  186. ;
  187. A$MDSND:  ANI    MDSND        ;                    14DH
  188.       RET            ;                    14FH
  189. ;
  190. C$MDSND:  CPI    MDSND        ;                    150H
  191.       RET            ;                    152H
  192. ;
  193. A$MDTXE:  ANI    MDTXE        ;                    153H
  194.       RET            ;                    155H
  195. ;
  196. C$MDTXE:  CPI    MDTXE        ;                    156H
  197.       RET            ;                    158H
  198. ;.....
  199. ;
  200. ;
  201. ; Special exit vector, used by some computers to reset interrupt vectors
  202. ;
  203. J$EXITVEC:JMP    RSTINT        ;                    159H
  204.                 ;                    15AH
  205. ;.....
  206. ;
  207. ;
  208. ; Jump vectors needed by each overlay
  209. ;
  210. J$GOODBYE:JMP    GOODBYE        ; Disconnects modem by dropping DTR    15CH
  211. J$INITMOD:JMP    INITMOD        ; Initializes modem, autosets baudrate    15FH
  212. J$STUPR:  JMP    STUPR        ; SET routine to change baudrate    162H
  213. J$SYSVR:  JMP    SYSVR        ; Signon message            165H
  214. ;.....
  215. ;
  216. ;
  217. ; "AT" command strings, can be replaced in individual overlay if needed
  218. ;
  219. J$STRNGA: DS    3        ; 1200 bps "AT" string            168H
  220. J$STRNG1: DS    3        ; 2400 bps "AT" string            16BH
  221. ;
  222. ;
  223. ; Next fourteen lines should not be changed by user overlay as these go
  224. ; to specific locations in the main program, not in the overlay.
  225. ;
  226. ;
  227. J$CMDSPL: DS    3        ; Allows entry of baudrate on CMD line    16EH
  228. J$CRLF:      DS    3        ; Turns up one new line on display    171H
  229. J$DIAL:      DS    3        ; Start of dialing routine        174H
  230. J$DSCONT: DS    3        ; Terminates modem use            177H
  231. J$GOLST:  DS    3        ; Printer routine, needed by Apple //e    17AH
  232. J$ILPRT:  DS    3        ; Prints an inline string, 0 to end    17DH
  233. J$INBUF:  DS    3        ; Stores a keybd string for comparison    180H
  234. J$INLNCP: DS    3        ; Inline "compare strings" routine    183H
  235. J$INMDM:  DS    3        ; Max .1 sec wait for modem character    186H
  236. J$RCVRSP: DS    3        ; For 3801 I/O use (TV-803)        189H
  237. J$SNDCHR: DS    3        ; Sends a character to the modem    18CH
  238. J$SNDSTR: DS    3        ; Sends a string to the modem, $ to end 18FH
  239. J$TIMER:  DS    3        ; .1 second timer (amount in 'B' reg.)    192H
  240. J$NEW1:      DB    0,0,0        ; For future needs            195H
  241. J$NEW2:      DB    0,0,0        ; For future needs            198H
  242. ;.....
  243. ;
  244. ;
  245. ; For 2400 bps auto-stepdown units
  246. ;
  247. MANUAL:      DB    0        ; For manual selection flag        19BH
  248. J$300:      JMP    OK300        ; Sets baudrate to 300 baud        19CH
  249. J$1200:      JMP    OK1200        ; Sets baudrate to 1200 bps        19FH
  250. J$2400:      JMP    OK2400        ; Sets baudrate to 2400 bps        1A2H
  251. ;.....
  252. ;
  253. ;
  254. LOGPTR:      DW    LOGON        ; Pointer to display LOGON message    1A5H
  255. ;
  256. SYSVR:      CALL    J$ILPRT        ; Display the following line        1A7H
  257.       DB    'Version for Osborne Vixen/OCC 4',CR,LF    ;        1AAH
  258.       DB    CR,LF,0
  259.       RET
  260. ;.....
  261. ;
  262. ;
  263. ;-----------------------------------------------------------------------
  264. ;
  265. ; NOTE:  You can change the SYSVER message to be longer or shorter.  The
  266. ;     end of your last routine should terminate by 0400H (601 bytes
  267. ;     available after start of SYSVER).
  268. ;
  269. ;-----------------------------------------------------------------------
  270. ;
  271. ; You can put in a message at this location which can be called up with
  272. ; (special character-L).  You can put in several lines.  End with a 0.
  273. ;
  274. LOGON:    DB    'Greetings from an Osborne Vixen user',CR,LF,0
  275. ;
  276. ;-----------------------------------------------------------------------
  277. ;
  278. ; This routine sets DTR low for 300 ms to disonnect the phone
  279. ;
  280. GOODBYE:
  281.     MVI    B,'S'-40H    ; X-off to stop host if needed
  282.     CALL    J$SNDCHR
  283.     MVI    B,1        ; Wait a moment to let it react
  284.     CALL    J$TIMER
  285.     MVI    A,15H        ; Send break, turn off RTS, DTR, Rx
  286.     CALL    OUTMDCTL1    ; Send to status port
  287.     MVI    B,3        ; Delay 300 ms to hang up phone
  288.     CALL    J$TIMER
  289.     MVI    A,MDCOM        ; Normal send/receive with DTR, RTS
  290.     JMP    OUTMDCTL1    ; Send to status port
  291. ;.....
  292. ;
  293. ;
  294. OUTMDCTL1:
  295.     DI
  296.     OUT    MDCTL1
  297.     EI
  298.     RET
  299. ;.....
  300. ;
  301. ;
  302. ; You can use this area for any special initialization or setup you may
  303. ; wish to include.  Each must stop with a RET.    You can check the other
  304. ; available overlays for ideas how to write your own routines if that
  305. ; may be of some help.
  306. ;
  307. INITMOD:
  308.     MVI    C,7        ; Use BDOS to obtain current IOBYTE
  309.     CALL    BDOS        ;
  310.     STA    OLDIOB        ; Save old IOBYTE
  311.     ANI    3FH        ;
  312.     ORI    80H        ; Make CEN: port new LST: device
  313.     MOV    E,A
  314.     MVI    C,8
  315.     CALL    BDOS        ; Use BDOS to place new IOBYTE in first
  316.                 ;   page of memory
  317. ;
  318.      DI            ; DISABLE interrupts
  319.     LHLD    INTVEC        ; Get serial port interrupt processor
  320.                 ;   address
  321.     SHLD    OLDVEC        ; Save serial port interrupt processor
  322.                 ;   address
  323.     DCX    H
  324.     DCX    H
  325.     DCX    H        ; HL = next interrupt processor address
  326.     SHLD    INTVEC        ; Now have first interrupt processor
  327.                 ;   rather than second
  328. ;
  329. ;
  330. ; Initialize the interrupt vector system
  331. ;
  332.     LHLD    BIOS        ; Find start of BIOS
  333.     MVI    L,3CH        ; Displacement of baud rate byte from
  334.                 ;   start of BIOS
  335.     STA    OLDBAUD        ; Save original baud rate byte
  336. ;
  337.     MVI    L,3BH        ; Displacement of 8251 mode byte from
  338.                 ;   start of bios
  339.     MOV    A,M        ; Old mode byte set by ROM is 2sb, no
  340.                 ;   parity, 8db, x16 clock
  341.     STA    OLDMODE        ; Save original 8251 mode byte
  342. ;
  343.     MOV    B,L
  344.     MVI    A,MDSET1    ; 1 sb, np, 8 db, x16 clock mode byte
  345.     CALL    IORESET        ; Use extended bios jump to reset 8251
  346.     MVI    A,MDCOM        ; RTS, DTR, Txd, Rxd on
  347.     OUT    31H        ; Send it to 8251 control port
  348.     MVI    A,3        ; Select 8155 port C
  349.     OUT    21H        ;
  350.     IN    28H        ; Get miscellaneous information byte
  351.     STA    OLDMSC        ; Save miscellaneous information byte
  352. ;
  353. ;
  354. ; Disable ring detect interrupt, Rxd interrupt, Txd
  355. ;
  356.     ORI    0FH
  357.     MOV    E,A        ; Interrupt, enable internal clock
  358.     MVI    A,3
  359.     OUT    21H        ; Select 8155 port C
  360.     MOV    A,E
  361.     OUT    28H        ; Send new control byte to 8155 port c
  362.      EI            ; RESTORE interrupts
  363. ;
  364. ;
  365. ; Set requested baudrate then finished with initialization
  366. ;
  367.     LDA    MSPEED        ; Get the selected value
  368.     CPI    1        ; 300 bps
  369.     JZ    OK300
  370.     CPI    5        ; 1200 bps
  371.     JZ    OK1200
  372.     CPI    6        ; 2400 bps
  373.     JZ    OK2400
  374.     CPI    8        ; 9600 bps
  375.     JZ    OK9600
  376.     CPI    9        ; 19200 bps
  377.     JZ    OK19200
  378.     JMP    STUPR1        ; Else ask what is wanted
  379. ;.....
  380. ;
  381. ;
  382. ;-----------------------------------------------------------------------
  383. ;
  384. ; Reset original interrupt vectors upon EXIT from program
  385. ;
  386. RSTINT:    LDA    OLDIOB        ; Get original IOBYTE
  387.     MVI    C,8
  388.     MOV    E,A        ; Use BDOS to restore original IOBYTE
  389.     CALL    BDOS
  390. ;
  391.      DI            ; DISABLE interrupts
  392.     MVI    A,15H        ; RTS, DTR off
  393.     LHLD    OLDVEC        ; Get original interrupt service address
  394.     SHLD    INTVEC        ; Restore orig interrupt service address
  395.     MVI    A,3        ; Select 8155 port C
  396.     OUT    21H
  397.     IN    28H        ; Get miscellaneous information byte for
  398.                 ;   controlling interrupt lines
  399.     ANI    030H        ; Zero the least significant four bits
  400.     MOV    E,A
  401.     LDA    OLDMSC        ; Get original misc. 8155 control byte
  402.     ANI    0FH        ; Zero the most significant four bits
  403.     ORA    E        ; Combine everything
  404.     MOV    E,A        ; Store temporarily
  405. ;
  406.     MVI    A,3
  407.     OUT    21H        ; Select 8155 port C, again
  408.     MOV    A,E        ; Store the value held in "E"
  409.     OUT    28H        ; Restore original 8155 control byte
  410.      EI            ; RESTORE interrupts
  411. ;
  412.     MVI    B,3CH
  413.     LDA    OLDBAUD        ; Restore original baud rate byte
  414.     CALL    IORESET        ; Do an 8251 reset
  415. ;
  416.     MVI    B,3BH
  417.     LDA    OLDMODE        ; Restore original mode byte
  418.     CALL    IORESET        ; Do an 8251 reset
  419.     RET
  420. ;.....
  421. ;
  422. ;
  423. IORESET:
  424. ;  SUBROUTINE WHICH EXECUTES A MASTER RESET FOR 8251.
  425. ;  8251 RESET IS A BIOS FUNCTION IN VIXEN EXTENDED BIOS
  426. ;
  427. ;    ENTRY:
  428. ;    A    =    BYTE VALUE TO BE REPLACED IN BIOS
  429. ;            (MODE BYTE OR BAUD RATE BYTE)
  430. ;
  431. ;    B    =    HEX DISPLACEMENT FROM BASE OF BIOS
  432. ;            FOR MODE BYTE OR BAUD RATE BYTE
  433. ;            (MODE BYTE = 3BH)
  434. ;            (BAUD RATE BYTE = 3CH)
  435. ;
  436. ;    EXIT:
  437. ;    NONE
  438. ;
  439.     LHLD    BIOS        ; Find base of BIOS
  440.     MOV    L,B
  441.     MOV    M,A
  442.     MVI    L,36H        ; Displacement in BIOS for 8251 reset
  443.                 ;   function
  444.     SHLD    EXTFUN
  445.     CALL    BIOSFUNC    ; Subroutine call of BIOS 8251 reset
  446.                 ;   function
  447.     RET
  448. ;.....
  449. ;
  450. OLDIOB:      DB    0        ; Orig    IOBYTE
  451. OLDMSC:      DB    0        ; Orig misc. ctl byte for 8155 port C
  452. OLDVEC:      DB    0,0        ; Orig interrupt service vector
  453. OLDMODE:  DB    1        ; Orig 8251 mode byte from BIOS
  454. OLDBAUD:  DB    1        ; Orig baud rate byte for 8251 from BIOS
  455. BIOSFUNC: DB    AJUMP        ; Absolute jump to following memory addr
  456. EXTFUN:      DB    0,0        ; Bios extended function address
  457. ;
  458. ;-----------------------------------------------------------------------
  459. ;
  460. ;
  461. STUPR:    CALL    J$CMDSPL    ; Gives us CMDBUF+6
  462.     JNC    STUPR2
  463. ;
  464. STUPR1:    CALL    J$ILPRT
  465.     DB    'Input Baud Rate (300, 1200, 2400, 9600, 19200): ',0
  466.     LXI    D,BAUDBUF    ; Point to new input buffer
  467.     CALL    J$INBUF
  468.     CALL    J$CRLF
  469.     LXI    D,BAUDBUF+2
  470. ;
  471. STUPR2:    CALL    J$INLNCP    ; Compare BAUDBUF+2 with chars. below
  472.     DB    '300',0
  473.     JNC    OK300        ; Go if got match
  474.     CALL    J$INLNCP
  475.     DB    '1200',0
  476.     JNC    OK1200
  477.     CALL    J$INLNCP
  478.     DB    '2400',0
  479.     JNC    OK2400
  480.     CALL    J$INLNCP
  481.     DB    '9600',0
  482.     JNC    OK9600
  483.     CALL    J$INLNCP
  484.     DB    '19200',0
  485.     JNC    OK19200
  486.     CALL    J$ILPRT        ; All matches failed, tell operator
  487.     DB    '++ Incorrect entry ++',CR,LF,BELL,CR,LF,0
  488.     JMP    STUPR1        ; Try again
  489. ;
  490. OK300:    MVI    A,1        ; MSPEED 300 baud value
  491.     MVI    B,BD300        ; Get 300 baud parameters in 'HL'
  492.     JMP    LOADBD        ; Go load them
  493. ;
  494. OK1200:    MVI    A,5
  495.     MVI    B,BD1200
  496.     JMP    LOADBD
  497. ;
  498. OK2400:    XRA    A
  499.     STA    MANUAL        ; Reset to maximum auto-speed
  500.     MVI    A,6
  501.     MVI    B,BD2400
  502.     JMP    LOADBD
  503. ;
  504. OK9600:    MVI    A,8
  505.     MVI    B,BD9600
  506.     JMP    LOADBD
  507. ;
  508. OK19200:MVI    A,9
  509.     MVI    B,BD19200
  510. ;
  511. LOADBD:    STA    MSPEED        ; Change time-to-send to match baudrate
  512.     MOV    A,B        ; Get baudrate byte
  513.     MVI    B,3CH
  514.     JMP    IORESET        ; Used extended BIOS function to reset
  515. ;.....                ;   baud rate on 8251
  516. ;
  517. ;
  518. ; Table of baudrate parameters
  519. ;
  520. ; Baudrate table (16 different rates are available)
  521. ;
  522. BD300    EQU    6        ; 300 baud
  523. BD1200    EQU    8        ; 1200 bps
  524. BD2400    EQU    11        ; 2400 bps
  525. BD4800    EQU    13        ; 4800 bps
  526. BD9600    EQU    15        ; 9600 bps
  527. BD19200    EQU    16        ; 19200 bps
  528. ;
  529. BAUDBUF:DB    10,0,0,0,0,0
  530.     DB    0,0,0,0,0,0
  531. ;
  532. ;                   end
  533. ;-----------------------------------------------------------------------
  534. ;
  535. ; NOTE: Must terminate by 0400H
  536. ;
  537.     END
  538.