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 / B5OS-3.IQS / B5OS-3.INS
Text File  |  2000-06-30  |  22KB  |  690 lines

  1. ; B5OS-3.INS - Osborne OS-1 insert for BYE5 - 09/15/85
  2. ;
  3. ;            6850 ACIA
  4. ;
  5. ; Note:  This is an insert, not an overlay.  If your OS-1 does not have
  6. ;     have the hardware mod to support DTR, (shown below) then set
  7. ;     the NODTR option in BYE5 to "YES".  Also set:
  8. ;
  9. ;            IMODEM   EQU   YES
  10. ;            NORING   EQU   YES
  11. ;
  12. ; =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =
  13. ;
  14. ; 09/15/85
  15. ;
  16. ;       Program now supports 2400 bps for the new 2400 bps modems
  17. ;       *  Equate added for NUEVO 80 column add-on video board with
  18. ;          optional baud rate generator.
  19. ;       *  Equate added for new Osborne 1.45 ROM for 2400 bps
  20. ;          operation and hardware mods.
  21. ;       *  Re-edited hardware mods descriptions
  22. ;                    - Roy Robinson
  23. ;
  24. ; 08/07/85
  25. ;
  26. ;       *  Program now runs properly with BYE5 program
  27. ;       *  Renamed several labels to more closely match BYE5
  28. ;          conventions
  29. ;       *  Changed MDOUTP routine with addition of PUSH PSW
  30. ;          and POP PSW statements.  MDOUTP routine for Osborne 1
  31. ;          clobbers accumulator register when called.
  32. ;       *  Changed MDQUIT routine, program now calls
  33. ;          RTSNBL and  IMQUIT if IMODEM equate is set true.
  34. ;       *  Changed MDINIT routine, program now calls
  35. ;          IMINIT if IMODEM equate is set true.
  36. ;       *  Changed MDCARCK routine
  37. ;                    - Roy Robinson
  38. ;
  39. ; 07/17/85  Revised for use with BYE5    - Kevin Murphy
  40. ;        (based on file from Roy Robinson)
  41. ;                    - Irv Hoff
  42. ;
  43. ; =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =
  44. ;
  45. ; NOTE:
  46. ;    IF YOU USE THE HARWARE MODIFICATION TO THE OZZIE 1.
  47. ;    When the Sysop terminates the BYE program with a control C fol-
  48. ;    lowed by any other key except 'E' or 'R' from the local console
  49. ;    keyboard to go off-line, the Sysop must press the RESET button
  50. ;    at the front of the Ozzie and reboot the computer before running
  51. ;    the BYE5 program again. This is due to the nature of the 6821
  52. ;    PIA input, CB2, which is used for carrier detect in the hardware
  53. ;    mod.  Pushing the RESET button triggers the CB2 input for proper
  54. ;    use with BYE5.    This reboot should be a minor inconvenience as
  55. ;    it is initiated only when the computer is off-line.
  56. ;
  57. ;                        - Roy Robinson
  58. ;
  59. ;
  60. ; =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =
  61. ;
  62. ; DOCUMENTATION FOR THIS BYE5 INSERT:
  63. ;
  64. ;-------------------
  65. ;
  66. ; If you intend to use this insert with none of the hardware modifica-
  67. ; tions to the main logic board described below, set the HARDMOD and
  68. ; BAUDMOD equates to NO.  You will have the following baud rate values:
  69. ; 300 and 1200 bps.  An unmodified Osborne 1 will not work if both the
  70. ; HARDMOD and BAUDMOD equates are set to YES.
  71. ;
  72. ; The NUEVO equate concerns the use of a "piggy-back" 80 column video
  73. ; board made by NUEVO ELECTRONICS with an optional baud rate generator.
  74. ; NUEVO ELECTRONICS may be contacted at: (713) 341-6001.
  75. ;
  76. ; The BAUDMOD equate concerns the use of a new ROM monitor chip (ROM
  77. ; version 1.45) available from Osborne Computer or your local Osborne
  78. ; dealer.  This ROM and the addition of five wire jumpers to your main
  79. ; logic board will give you 300/1200/2400 bps serial I/O for the new
  80. ; 2400 bps modems.
  81. ;
  82. ; *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  83. ;
  84. ; The NUEVO equate:
  85. ;
  86. ; If you have the NUEVO 80 column video board with the baud rate option
  87. ; installed, set the NUEVO equate to YES.  You will then have the fol-
  88. ; lowing baud rates available: 300, 1200 2400, bps.
  89. ;
  90. ; If your NUEVO 80 column board does NOT have the optional baud rate
  91. ; generator, set the NEUVO equate to NO.  Since the NUEVO baud rate
  92. ; generator is not installed, you will have the following baud rates
  93. ; available 300 and 1200 bps.
  94. ;
  95. ; Contact NUEVO ELECTRONICS if you wish to install the baud rate option
  96. ; on your NUEVO 80 column board.
  97. ;
  98. ; *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  99. ;
  100. ; The HARDMOD equate:
  101. ;
  102. ; If you decide to install the DTR and DCD modification to your OS-1
  103. ; main logic board, set the HARDMOD equate to YES.  This modification
  104. ; can be installed in an Osborne 1 with or without the Osborne or NUEVO
  105. ; 80 column video boards.  The modification gives the Osborne 1 the
  106. ; ability to force the modem to hang up the phone by dropping the 6850
  107. ; ACIA RTS line which is connected to the modem DTR input.
  108. ;
  109. ; The data carrier detect modification gives the Osborne the ability to
  110. ; detect carrier loss within a very short time (usually within a couple
  111. ; of seconds) rather than depending on a time-out which can take up to
  112. ; 30 seconds or more.
  113. ;
  114. ; If you do use the DTR and DCD modification, you will need to configure
  115. ; a special RS-232 cable from your Osborne 1 serial port to your exter-
  116. ; nal modem.  Your modem must support the DTR and DCD input signal lines
  117. ; and you must set the modem DTR and DCD switches or program the modem
  118. ; internal memory to monitor its DTR and DCD signal inputs.
  119. ;
  120. ; New RS-232 modem cable to be used with OCC-1 and external modem when
  121. ; using DTR control:
  122. ;
  123. ;
  124. ;      OCC-1                MODEM
  125. ;
  126. ;     2    RXD              3    RXD
  127. ;     3    TXD              2    TXD
  128. ;     4    DCD (new function)      8    DCD
  129. ;     5    RTS (new function)      20   DTR
  130. ;     7    GND              7    GND
  131. ;
  132. ;    DTR AND DCD SUPPORT MODIFICATION
  133. ;
  134. ; OSBORNE 1 MAIN LOGIC BOARD TRACE CUTS:
  135. ; The Osborne 1 main logic board is organized into zones which are iden-
  136. ; tified on the COMPONENT side of the main logic board with LETTERS found
  137. ; along the left side of the board and NUMBERS found along the rear of
  138. ; the  board (i.e., the 6850 ACIA device is located in zones C4, C5, and
  139. ; C6 and the MC1458 device is located in zone E3).  If you are unsure
  140. ; how to count pin numbers on IC devices, find a friend who does, attend
  141. ; a user group meeting, or take your computer to a computer store/service
  142. ; center for further aid.
  143. ;
  144. ; --------------------------
  145. ; Solder Side:
  146. ;
  147. ; 1.    Cut the trace running from pin 5 to pin 6 on the inner row of
  148. ;    pads used to mount the RS-232 female serial connector at the
  149. ;    front of the main logic board.  Pin 1 is the pad with a wide
  150. ;    ground trace.
  151. ;
  152. ; Component side:
  153. ;
  154. ; 2.    Cut the trace from pin 5 of the 6850 ACIA device in zone C4 to
  155. ;    resistor R20 (10K ohm) located in zone D5.
  156. ;
  157. ; 3.    Cut the trace that runs BETWEEN pins 3 and 4 of the 6850 device
  158. ;    in zone C4.  Note: pins 3 and 4 do not have visible traces run-
  159. ;    ning to them on the component side.
  160. ;
  161. ; PART ADDITIONS:
  162. ; --------------
  163. ; Solder side:
  164. ;
  165. ; 5.    Add a jumper wire from pin 1 of the MC1458 device in zone E3 to
  166. ;    pin 5 on the inner row of the RS-232 serial port pads.  Pin 1 is
  167. ;    the pad with the wide ground trace.
  168. ;
  169. ; 6.    Add a jumper wire from pin 3 of the MC1458 device in zone E3 to
  170. ;    pin 5 of the same MC1458 device in zone E3.
  171. ;
  172. ; 7.    Add a jumper wire from pin 5 of the 74LS08 device in zone C1 to
  173. ;    pin 10 of the LM3400 device in zone D4.
  174. ;
  175. ; 8.    Add a jumper wire from pin 4 of the 74LS08 device in zone C1 to
  176. ;    pin 1 of the 74LS04 device in zone E20.
  177. ;
  178. ; 9.    Add a jumper wire from pin 6 of the 74LS08 device in zone C1 to
  179. ;    pin 5 of the 74LS04 device in zone A11.
  180. ;
  181. ; 10.    Add a jumper wire from pin 19 of the 6821 device in zone C15 to
  182. ;    pin 6 of the 74LS04 device in zone A11.
  183. ;
  184. ;
  185. ; Using the component side or solder side (whichever side you feel more
  186. ; comfortable for mounting  the two - 1/4 watt resistors):
  187. ;
  188. ; 11.    Mount a 10K ohm resistor from Vcc which is +5 volts (pin 14 of
  189. ;    the 74LS02 device in zone D2 is a good solder point) to pin 2 of
  190. ;    the MC1458 device in zone E3.
  191. ;
  192. ; 12.    Mount a 220 ohm resistor from pin 5 of the 6850 ACIA device in
  193. ;    zone C4 to pin 2 of the MC1458 device in zone E3.  Pin 2 of the
  194. ;    MC1458 device in zone E3 should now have two resistors attached
  195. ;    to it.
  196. ;
  197. ; 13.    Mount a 1K ohm resistor from pin 19 of the 6821 PIA device in
  198. ;    zone C15 to Vcc which is +5 volts (pin 16 of the 74LS161 device
  199. ;    in zone D18 is a good solder point).
  200. ;
  201. ; *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  202. ;
  203. ; The BAUDMOD equate:
  204. ;
  205. ;        300/1200/2400 BAUD SUPPORT MODIFICATION
  206. ;
  207. ; This modification now allows you to have 300/1200/2400 bps support un-
  208. ; der software control.  The modification involves five jumper wires and
  209. ; the installation of a NEW MONITOR ROM - ROM VERSION 1.45.  The code in
  210. ; the new ROM has modified the 6821 VIDEO PIA control byte value for
  211. ; register A.  The CA2 Peripheral Control Line is now an output control
  212. ; line rather than an input status line.  The input status line was used
  213. ; with the COMM-PAC/DATA-COMM modems.  The new output control line will
  214. ; allow 600/2400 baud operation for the 6850 ACIA serial I/O chip with
  215. ; the following hardware modifications to the main logic board:
  216. ;
  217. ;    On the main logic board - COMPONENT SIDE:
  218. ;
  219. ; 1.    Remove Jumper J1 found in zone C4 located next to the
  220. ;    6821 ACIA chip.
  221. ;    This will expose two pins which we will refer to as the
  222. ;    Jumper J1 FRONT and REAR pins.
  223. ;
  224. ;    The FRONT pin is the pin located toward the front edge of
  225. ;    the main logic board.  The front edge of the logic board has the
  226. ;    printer connectors and video controls mounted at the edge.
  227. ;    On the solder side of the main logic board, the FRONT pin
  228. ;    has a trace leading to pin 7 of the 74LS161 chip at
  229. ;    zone C3.
  230. ;    The REAR pin has no trace on the solder side of the board
  231. ;    and is located toward the rear edge of the main logic
  232. ;    board.
  233. ;
  234. ;    On the main logic board - SOLDER SIDE
  235. ;
  236. ; 2.    Add a jumper wire from pin 4 of the 74LS08 chip in zone A5
  237. ;    to the REAR pin of J1.
  238. ;
  239. ; 3.    Add a jumper wire from pin 5 of the 74LS08 chip in zone A5
  240. ;    to pin 39 of the 6821 chip in zone C15.
  241. ;
  242. ; 4.    Add a jumper wire from pin 6 of the 74LS08 chip in zone A5
  243. ;    to pin 5 of the 74LS02 chip in zone D2.
  244. ;
  245. ; 5.    Add a jumper wire from pin 5 of the 74LS02 chip in zone D2
  246. ;    to pin 6 of the 74LS02 in zone D2.  Pin 5 now has two
  247. ;    jumpers connected to it.
  248. ;
  249. ; 6.    Add a jumper wire from pin 4 of the 74LS02 chip in zone D2
  250. ;    to the FRONT pin of Jumper J1.
  251. ;
  252. ; With this modification you will now be unable to use the Osborne
  253. ; COMM-PAC or CTS DATA-COMM modems.  The CA2 line, originally a modem
  254. ; input status line, is now an output control line used to select one
  255. ; of two clock frequencies supplied to the ACIA TX and RX clock inputs.
  256. ;
  257. ;-----------------------------------------------------------------------
  258. ;
  259. ;
  260. WRKBAUD:DB    16H    ; [*] OCC1 ++
  261. SSTAT:    DB    0    ; RAM location serves as a secondary status
  262.             ;   register for the 6850 ACIA status register.
  263.             ;   This secondary RAM register is used because
  264.             ;   the  6850 ACIA clobbers its own status reg-
  265.             ;   ister (with regard to TBE and RDA status
  266.             ;   bits) when data is traveling in both direc-
  267.             ;   tions via the serial port.    This status bit
  268.             ;   recognition problem was illustrated with data
  269.             ;   being output during a display listing to the
  270.             ;   remote user, and the remote user wished to
  271.             ;   suspend or abort the screen display by typing
  272.             ;   a ^S, ^C, or ^K.
  273. ;
  274. ;-----------------------------------------------------------------------
  275. ;
  276. ;
  277. HARDMOD    EQU    YES    ; YES, if hardware mods have been installed in
  278.             ;   Osborne O-1 to support DTR and modified DCD.
  279.             ;   (see installation procedure above)
  280.             ;
  281.             ; NO,  if the O-1 is standard (no mods).
  282.             ;   If NO, you must set the NODTR equate to YES
  283.             ;   in the main body of the BYE5 program.  You
  284.             ;   must also use an intelligent modem (one that
  285.             ;   supports hayes or racal-vadic software com-
  286.             ;   mand protocol) and set the IMODEM equate to
  287.             ;   YES in the main body of the BYE5 program.
  288.             ;
  289. NUEVO    EQU    NO    ; YES, if Nuevo 80 column upgrade WITH baud rate
  290.             ;   option has been installed.
  291.             ;   (see discussion above)
  292.             ;
  293.  
  294. BAUDMOD    EQU    NO    ; YES, if new Osborne ROM version 1.45 and baud
  295.             ;   rate jumper modification are installed.
  296.             ;   Do not set to YES if you have not installed
  297.             ;   new ROM and jumper modification
  298.             ;   (see discussion above)
  299.             ;
  300. ;-----------------------------------------------------------------------
  301. ;
  302. ;
  303. STATM    EQU    02A00H
  304. DATA    EQU    02A01H
  305. CDATA    EQU    02C02H
  306. CSTAT    EQU    02C03H
  307. ;
  308. ;
  309.      IF    HARDMOD
  310. MDDCD    EQU    40H
  311.      ENDIF
  312. ;
  313. ;
  314.      IF    NOT HARDMOD
  315. MDDCD    EQU    04H
  316.      ENDIF
  317. ;
  318. RRDA    EQU    0FEH
  319. MRDA    EQU    1
  320. RTBE    EQU    0FDH
  321. MTBE    EQU    2
  322. ;
  323. ;
  324. ;-----------------------------------------------------------------------
  325. ;
  326. ; See if we still have a carrier - if not, return with the zero flag set
  327. ;
  328. MDCARCK:
  329.      IF    HARDMOD
  330.     DI        ; Disable interrupts
  331.     OUT    0
  332.     LDA    CSTAT    ; Read video PIA status register
  333.     OUT    1
  334.     EI
  335.      ENDIF        ; HARDMOD
  336. ;
  337. ;
  338.      IF    NOT HARDMOD
  339.     CALL    BNKINS    ; Get modem status
  340.      ENDIF        ; NOT HARDMOD
  341. ;
  342. ;
  343.     CMA        ; Complement register, DCD bit set with LOSS of
  344.             ;   carrier.  Most I/O devices use active high.
  345.     ANI    MDDCD    ; Mask out everything but carrier LOSS bit
  346.             ; Z=1 Lost carrier
  347.             ; Z=0 Carrier present
  348.     RET
  349. ;......
  350. ;
  351. ;
  352. ; Disconnect and wait for an incoming call
  353. ;
  354. MDINIT:    CALL    RTSDIS    ; Clear RTS causing hangup
  355.     CALL    RTSNBL    ; Turn on DTR so modem can answer phone
  356.     CALL    OFFTIM    ; Wait 2 seconds
  357. ;
  358.      IF     IMODEM
  359.     CALL    IMINIT    ; Initialize smartmodem
  360.      ENDIF        ; IMODEM
  361. ;
  362.      IF    HARDMOD
  363.     CALL    INITCAR    ; Reset carrier detect input on 6821 video PIA
  364.      ENDIF        ; HARDMOD
  365. ;
  366.     RET
  367. ;.....
  368. ;
  369. ;
  370. ; Input a character from the modem port
  371. ;
  372. MDINP:    CALL    BNKIND    ; Input data from RS-232 serial port
  373.     PUSH    PSW    ; Save the character
  374.     LDA    SSTAT    ; Load secondary ACIA status register from RAM
  375.     ANI    RRDA    ; Mask the RDA bit (reset RDA bit in secondary
  376.             ;   register)
  377.     STA    SSTAT    ; Save our updated status register in RAM
  378.     POP    PSW    ; Recover the character
  379.     RET        ; Return to sender
  380. ;.....
  381. ;
  382. ;
  383. ; Check the status to see if a character is available.    If not, return
  384. ; with the zero flag set.  If yes, use 0FFH to clear the flag.
  385. ;
  386. MDINST:    PUSH    B    ; Save BC registers
  387.     LDA    SSTAT    ; Load secondary ACIA status register
  388.             ;   (contains status of ACIA from last ACIA 
  389.             ;   operation)
  390.     MOV    B,A    ; Save it in register B
  391.     CALL    BNKINS    ; Input current ACIA status register
  392.     ORA    B    ; Perform an OR operation on both former
  393.             ;   as well as present ACIA register states.
  394.     STA    SSTAT    ; Save updated ACIA register state in secondary
  395.             ;   ACIA register
  396.     ANI    MRDA    ; Mask RDA bit
  397.     POP    B    ; Recover former BC registers
  398.     RZ        ; Nothing?  Return to sender with Z-flag set
  399.     ORI    0FFH    ; We got something....
  400.     RET        ; Return to sender with Z-flag not set
  401. ;.....
  402. ;
  403. ;
  404. ; Send a character to the modem
  405. ;
  406. MDOUTP:    PUSH    PSW
  407.     CALL    BNKOUTD    ; Output data to RS-232 serial port
  408.     LDA    SSTAT    ; Load secondary ACIA register
  409.     ANI    RTBE    ; Mask the TBE bit
  410.     STA    SSTAT    ; Save secondary ACIA register (now updated)
  411.     POP    PSW
  412.     RET        ; Return to sender
  413. ;.....
  414. ;
  415. ;
  416. ; Check the status to see if ACIA can output a character.  If not,
  417. ; return with the zero flag set.  If yes, use 0FFH to clear the flag.
  418. ;
  419. MDOUTST:PUSH    B    ; Save BC registers
  420.     CALL    BNKINS    ; Get present ACIA status register
  421.     MOV    B,A    ; Move it to 'B' register
  422.     LDA    SSTAT    ; Get secondary ACIA status register
  423.     ORA    B    ; Perform an OR operation on present and former
  424.             ;   ACIA status register states
  425.     STA    SSTAT    ; Save updated ACIA status register in secondary
  426.             ;   ACIA status register
  427.     ANI    MTBE    ; Mask the TBE bit
  428.     POP    B    ; Recover the former BC registers
  429.     RZ        ; Transmit buffer not empty so return
  430.             ;   to sender with Z-flag set
  431.     ORI    0FFH    ; If empty...
  432.     RET        ; Ready to send character
  433. ;.....
  434. ;
  435. ;
  436. ; Reinitialize the modem and hang up the phone by dropping RTS and
  437. ; leaving it inactive
  438. ;
  439. MDQUIT:    CALL    RTSDIS    ; Disable RTS output, forcing modem to hang-up
  440. ;
  441.      IF    IMODEM
  442.     CALL    RTSNBL    ; Turn on RTS so modem can be programmed
  443.     CALL    IMQUIT    ; If a smartmodem, tell it to shut down
  444.      ENDIF        ; IMODEM
  445. ;
  446. ;
  447. ; Called by the main program after caller types BYE
  448. ;
  449. MDSTOP:    CALL    RTSDIS    ; Disable RTS causing modem hangup
  450. ;
  451.     RET
  452. ;.....
  453. ;
  454. ;
  455. ; Initialize the 6850 ACIA and disable RTS line which serves as DTR
  456. ; control for the modem
  457. ;
  458. RTSDIS:
  459. ;
  460.     MVI    A,57H    ; IRQ disabled
  461.             ; RTS disabled (valid for modified/unmodified
  462.             ; O-1)
  463.             ;    with HARDMOD on, modem forced to hang up
  464.             ;    with HARDMOD off, modem is disconnects
  465.             ; 8 data bits, 1 stop bit, MRESET
  466.     CALL    BNKOUTS
  467. ;
  468. OFFTIM:    PUSH    B    ;2 second delay after dropping the ACIA RTS line
  469.     MVI    B,20    ;(which is DTR to the modem)
  470. ;
  471. OFFTI:
  472.     CALL    DELAY
  473.     DCR    B
  474.     JNZ    OFFTI
  475.     POP    B
  476.     RET
  477. ;.....
  478. ;
  479. ;
  480. ; Reset video 6820 PIA register for future detection of lost carrier
  481. ;
  482. INITCAR:
  483.     DI
  484.     OUT    0
  485.     LDA    CDATA    ; Read video pia data register to reset cb2 bit
  486.     OUT    1
  487.     EI
  488.     RET
  489. ;.....
  490. ;
  491. ;
  492. RTSNBL:    LDA    WRKBAUD    ; ACIA reset, set RTS state, set data parameters
  493.     CALL    BNKOUTS
  494.     RET
  495. ;.....
  496. ;
  497. ;
  498. BNKINS:    DI        ; Disable interrupts
  499.     OUT    0    ; Switch banks to shadow memory bank
  500.     LDA    STATM    ; Read ACIA status register (memory mapped)
  501.     OUT    1    ; Switch banks back to program memory bank
  502.     EI        ; Re-enable interrupts
  503.     RET        ; Go home
  504. ;.....
  505. ;
  506. ;
  507. BNKIND:    DI        ; Disable interrupts
  508.     OUT    0    ; Switch banks to shadow memory bank
  509.     LDA    DATA    ; Read ACIA data register (memory mapped)
  510.     OUT    1    ; Switch banks back to program memory bank
  511.     EI        ; Reenable interrupts
  512.     RET        ; Go home
  513. ;.....
  514. ;
  515. ;
  516. BNKOUTS:DI        ; Disable interrupts
  517.     OUT    0    ; Switch banks to shadow memory bank
  518.     STA    STATM    ; Write data to ACIA control register (memory
  519.             ;   mapped)
  520.     OUT    1    ; Switch banks to program memory bank
  521.     EI        ; Reenable interrupts
  522.     RET        ; Go home
  523. ;.....
  524. ;
  525. ;
  526. BNKOUTD:DI        ; Disable interrupts
  527.     OUT    0    ; Switch banks to shadow memory bank
  528.     STA    DATA    ; Write data to ACIA data register (memory
  529.             ;   mapped)
  530.     OUT    1    ; Switch banks to program memory bank
  531.     EI        ; Reenable interrupts
  532.     RET        ; Go home
  533. ;.....
  534. ;
  535. ;
  536. ; The following routines set the baudrate.  BYE5 would like the maximum
  537. ; speed you have available for controlling your modem.
  538. ;
  539. ;    the code below is for an osborne without the nuevo 80 column
  540. ;    video board and without the 1.45 ROM
  541. ;
  542.      IF NOT    NUEVO AND NOT BAUDMOD AND NOT HARDMOD
  543. SET300:
  544.     MVI    A,56H    ; IRQ disabled, RTS disabled (required for
  545.             ;   non-modified O-1)
  546.             ; 8 data bits, 1 stop bit, 64X clock
  547.     JMP    SETBAUD
  548. ;
  549. SET1200:
  550.     MVI    A,55H    ; IRQ disabled, RTS disabled (required for
  551.             ;   non-modified O-1)
  552.             ; 8 data bits, 1 stop bit, 16X clock
  553.      ENDIF        ; NOT NUEVO AND NOT BAUDMOD AND NOT HARDMOD
  554. ;
  555.      IF NOT    NUEVO AND NOT BAUDMOD AND HARDMOD
  556. SET300:    MVI    A,16H    ; IRQ disabled, RTS enabled (required for
  557.             ;   modified O-1)
  558.             ; 8 data bits, 1 stop bit, 64X clock
  559.     JMP    SETBAUD
  560. ;
  561. SET1200:
  562.     MVI    A,15H    ; IRQ disabled, RTS enabled (required for
  563.             ;   modified O-1)
  564.             ; 8 data bits, 1 stop bit, 16X clock
  565.      ENDIF        ; NOT NUEVO AND NOT BAUDMOD AND HARMOD
  566. ;
  567.      IF NOT    NUEVO AND NOT BAUDMOD
  568. SETBAUD:
  569.     STA    WRKBAUD    ; Save incoming baud rate and ACIA parameters
  570.     CALL    BNKOUTS
  571.     XRA    A    ; Show baudrate was ok
  572.     RET
  573. ;
  574. SET2400    EQU    $    ; The unmodified OS-1 doesn't like 2400
  575. ;
  576. SETINV:    MVI    A,0FFH    ; Return bad
  577.     ORA    A    ; Show baudrate was unacceptable
  578.     RET
  579.      ENDIF        ; NOT NUEVO AND NOT BAUDMOD
  580. ;...
  581. ;
  582. ;
  583. ; The following code is for an osborne with the ROM 1.45 and baudrate
  584. ; mods
  585. ;
  586.      IF    BAUDMOD    AND NOT    NUEVO
  587. SET300:
  588.      ENDIF            ; BAUDMOD AND NOT NUEVO
  589. ;
  590.      IF    BAUDMOD    AND NOT    NUEVO AND HARDMOD
  591.     MVI    C,16H        ; X64 clock, 8 DB 1 SB, RTS active
  592.      ENDIF            ; BAUDMOD AND NOT NUEVO AND HARDMOD
  593. ;
  594.      IF    BAUDMOD    AND NOT    NUEVO AND NOT HARDMOD
  595.     MVI    C,56H        ; X64 clock, 8 DB 1 SB, RTS inactive
  596.      ENDIF            ; BAUDMOD AND NOT NUEVO AND NOT HARDMOD
  597. ;
  598.      IF    BAUDMOD    AND NOT    NUEVO
  599.     MVI    B,3FH        ; Get low baud VIDEO PIA value
  600.     JMP    SETBAUD        ; Load PIA and ACIA control bytes
  601. ;
  602. SET1200:
  603.      ENDIF            ; BAUDMOD AND NOT NUEVO
  604. ;
  605.      IF    BAUDMOD    AND NOT    NUEVO AND HARDMOD
  606.     MVI    C,15H        ; X16 clock, 8 DB 1 SB, RTS active
  607.      ENDIF            ; BAUDMOD AND NOT NUEVO AND HARDMOD
  608. ;
  609.      IF    BAUDMOD    AND NOT    NUEVO AND NOT HARDMOD
  610.     MVI    C,55H        ; X16 clock, 8 DB 1 SB, RTS inactive
  611.      ENDIF            ; BAUDMOD AND NOT NUEVO AND NOT HARDMOD
  612. ;
  613.      IF    BAUDMOD    AND NOT    NUEVO
  614.     MVI    B,3FH        ; Get low baud VIDEO PIA value
  615.     JMP    SETBAUD        ; Load PIA and ACIA control bytes
  616. ;
  617. SET2400:
  618.      ENDIF            ; BAUDMOD AND NOT NUEVO
  619. ;
  620.      IF    BAUDMOD    AND NOT    NUEVO AND HARDMOD
  621.     MVI    C,15H        ; X16 clock, 8 DB 1 SB, RTS active
  622.      ENDIF            ; BAUDMOD AND NOT NUEVO AND HARDMOD
  623. ;
  624.      IF    BAUDMOD    AND NOT    NUEVO AND NOT HARDMOD
  625.     MVI    C,55H        ; X16 clock, 8 DB 1 SB, RTS inactive
  626.      ENDIF            ; BAUDMOD AND NOT NUEVO AND NOT HARDMOD
  627. ;
  628.      IF    BAUDMOD    AND NOT    NUEVO
  629.     MVI    B,37H        ; Get high baud VIDEO PIA value
  630. ;
  631. SETBAUD:
  632.     MOV    A,B        ; Load Acc with PIA baud rate speed value
  633.     DI
  634.     OUT    0        ; Switch to alternate bank
  635.     STA    2C01H        ; Output data to VIDEO PIA control
  636.                 ;   register A
  637.     OUT    1        ; Switch to main bank
  638.     EI
  639. ;
  640.     MOV    A,C        ; Load Acc with ACIA control byte
  641.     STA    WRKBAUD        ; Save incoming ACIA control byte
  642.     CALL    BNKOUTS
  643.     XRA    A        ; Show baudrate was ok
  644.     RET
  645.      ENDIF            ; BAUDMOD AND NOT NUEVO
  646. ;...
  647. ;
  648. ;
  649. ; The code below is for an Osborne with Nuevo 80-column video board
  650. ; installed
  651. ;
  652.      IF NUEVO AND NOT BAUDMOD
  653. SET300:
  654.     MVI    A,05H    ; 300 bps byte
  655.     JMP    SETBAUD1
  656. ;
  657. SET1200:
  658.     MVI    A,07H    ; 1200 bps byte
  659.     JMP    SETBAUD1
  660. ;
  661. SET2400:
  662.     MVI    A,0AH    ; 2400 bps byte
  663. ;
  664. SETBAUD1:
  665.     OUT    06H    ; Send to Nuevo baud rate generator port
  666.      ENDIF        ; NUEVO AND NOT BAUDMOD
  667. ;
  668.      IF NUEVO AND NOT BAUDMOD AND NOT HARDMOD
  669.     MVI    A,55H    ; IRQ disabled, RTS disabled (required for
  670.             ;   non-modified O-1)
  671.             ; 8 data bits, 1 stop bit, 16X clock
  672.      ENDIF        ; NUEVO AND NOT BAUDMOD AND NOT HARDMOD
  673. ;
  674.      IF NUEVO AND NOT BAUDMOD AND HARDMOD
  675.     MVI    A,15H    ; IRQ disabled, RTS enabled (required for
  676.             ;   modified O-1)
  677.             ; 8 data bits, 1 stop bit, 16X clock
  678.      ENDIF        ; NUEVO AND NOT BAUDMOD AND HARDMOD
  679. ;
  680.      IF NUEVO AND NOT BAUDMOD
  681. SETBAUD:
  682.     STA    WRKBAUD    ; Save incoming baud rate and ACIA parameters
  683.     CALL    BNKOUTS
  684.     XRA    A    ; Show baudrate was ok
  685.     RET
  686.      ENDIF        ; NUEVO AND NOT BAUDMOD
  687. ;
  688. ;
  689. ;               end
  690. ;-----------------------------------------------------------------------