home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / zsys / znode-12 / a / 1a.asm < prev    next >
Encoding:
Assembly Source File  |  1994-07-13  |  8.3 KB  |  238 lines

  1. ;
  2. ; M7RA-1.ASM  This overlay has been adapted for the Royal Alphatronic.  
  3. ; The Royal uses a 8251-A USART which can be software defined except for 
  4. ; baud rate which must be hardware selected inside the machine.
  5. ;
  6. ; Port 41H can be programmed with the proper mode and control commands.  
  7. ; The chip select command is MVI  A,0CH, the internal reset command is 
  8. ; MVI A,40H, the mode command is MVI A,4EH for 8 data bits, no parity, 1 
  9. ; stop bit.  The command instruction is MVI A,37H (all out MODCTL2)
  10. ;
  11. ; M7DP-1.ASM -- Datapoint 1560 overlay file for MDMxx2.  11/11/83
  12. ;
  13. ; You will want to look this file over carefully. There are a number of
  14. ; options that you can use to configure the program to suit your taste.
  15. ; This file adapts the Datapoint 1560 computer to the modem program.
  16. ; Much of the information contained here is not in the main file.
  17.  
  18. ; Edit this file for your preferences then follow the "TO USE:" example
  19. ; shown below.
  20. ;
  21. ;    TO USE: First edit this file filling in answers for your own
  22. ;        equipment.  Then assemble with ASM.COM or equivalent
  23. ;        assembler.
  24. ;
  25. ;       Load M7xx-1 into MEX.COM using MLOADxx
  26. ;
  27. ;       A>MLOADxx NEWMEX.COM=MEX.COM,xxxxxx.HEX
  28. ;
  29. ; =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   
  30. ; 07/11/88 - Renamed to M7RA-1.ASM              - Lee Bradley
  31. ; 11/11/87 - Renamed to M7RA-4D.ASM, added INITMOD: - Charles Battista               
  32. ; 11/11/83 - Renamed to M7DP-1.ASM, no changes    - Irv Hoff
  33. ; 07/27/83 - Renamed to work with MDM712    - Irv Hoff
  34. ; 07/01/83 - Revised to work with MDM711    - Irv Hoff
  35. ; 06/22/83 - Revised to work with MDM710    - Irv Hoff
  36. ; 05/25/83 - Updated to work with MDM709    - Irv Hoff
  37. ; 05/15/83 - Revised to work with MDM708    - Irv Hoff
  38. ; 04/11/83 - Updated to work with MDM707    - Irv Hoff
  39. ; 04/04/83 - Updated to work with MDM706    - Irv Hoff
  40. ; 02/27/83 - Updated to work with MDM705    - Irv Hoff
  41. ; 02/17/83 - Modified MDM703CF for Datapoint
  42. ;         1560 computers using an exter-
  43. ;         nal modem                - Irv Hoff
  44. ;
  45. ; =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =
  46. ;
  47. BELL:        EQU    07H        ;bell
  48. CR:        EQU    0DH        ;carriage return
  49. ESC:        EQU    1BH        ;escape
  50. LF:        EQU    0AH        ;linefeed
  51. ;
  52. YES:        EQU    0FFH
  53. NO:        EQU    0
  54. ;
  55. ;
  56. PORT:        EQU    040H        ;Royal Alphatronic Data Port
  57. MODCTL1:    EQU    PORT+1        ;Modem status port
  58. MODCTL2:    EQU    PORT+1        ;Modem control port
  59. MODDATP:    EQU    PORT        ;Modem data port
  60. ;
  61. ;
  62.         ORG    100H
  63. ;
  64.         DS    3    ;(for  "JMP   START" instruction)
  65. ;
  66.  
  67. PMMIMODEM:    DB    NO    ;yes=PMMI S-100 Modem            103H
  68. SMARTMODEM:    DB    NO    ;yes=HAYES Smartmodem            104H
  69. TONEPULSE:    DB    'P'    ;T=tone, P=Pulse (Smartmodem-only)    105H
  70. CLOCK:        DB    40    ;clock speed in MHz x10, 25.5 MHz max.    106H
  71.                 ;20=2 MHh, 37=3.68 MHz, 40=4 MHz, etc.
  72. MSPEED:     DB    5    ;0=110 1=300 2=450 3=600 4=710 5=1200    107H
  73.                 ;6=2400 7=4800 8=9600 9=19200 default
  74. BYTDLY:     DB    5    ;0=0 delay  1=10ms  5=50 ms - 9=90 ms    108H
  75.                 ;default time to send character in ter-
  76.                 ;minal mode file transfer for slow BBS.
  77. CRDLY:        DB    5    ;0=0 delay 1=100 ms 5=500 ms - 9=900 ms 109H
  78.                 ;default time for extra wait after CRLF
  79.                 ;in terminal mode file transfer
  80. NOOFCOL:    DB    5    ;number of DIR columns shown        10AH
  81. SETUPTST:    DB    NO    ;yes=user-added Setup routine        10BH
  82. SCRNTEST:    DB    YES    ;Cursor control routine         10CH
  83. ACKNAK:     DB    YES    ;yes=resend a record after a non-ACK    10DH
  84.                 ;no=resend a record only after NAK
  85. BAKKUPBYTE:    DB    NO    ;yes=change any file same name to .BAK    10EH
  86. CRCDFLT:    DB    YES    ;yes=default to CRC checking        10FH
  87. TOGGLECRC:    DB    YES    ;yes=allow toggling of CRC to Checksum    110H
  88. CONVBKSP:    DB    NO    ;yes=convert backspace to rub        111H
  89. TOGGLEBK:    DB    NO    ;yes=allow toggling of bksp to rub    112H
  90. ADDLF:        DB    NO    ;no=no LF after CR to send file in    113H
  91.                 ;terminal mode (added by remote echo)
  92. TOGGLELF:    DB    YES    ;yes=allow toggling of LF after CR    114H
  93. TRANLOGON:    DB    YES    ;yes=allow transmission of logon    115H
  94.                 ;write logon          at location LOGON
  95. SAVCCP:     DB    YES    ;yes=do not overwrite CCP        116H
  96. LOCONEXTCHR:    DB    NO    ;yes=local command if EXTCHR precedes    117H
  97.                 ;no=external command if EXTCHR precedes
  98. TOGGLELOC:    DB    YES    ;yes=allow toggling of LOCONEXTCHR    118H
  99. LSTTST:     DB    YES    ;yes=printer available on printer port    19H
  100. XOFFTST:    DB    NO    ;yes=chcks for XOFF from remote while    11AH
  101.                 ;sending a file in terminal mode
  102. XONWAIT:    DB    NO    ;yes=wait for XON after CR while    11BH
  103.                 ;sending a file in terminal mode
  104. TOGXOFF:    DB    YES    ;yes=allow toggling of XOFF checking    11CH
  105. IGNORCTL:    DB    YES    ;yes=CTL-chars above ^M not displayed    11DH
  106. EXTRA1:     DB    0    ;for future expansion            11EH
  107. EXTRA2:     DB    0    ;for future expansion            11FH
  108. BRKCHR        DB    '@'-40H ;Send a 300 ms. break tone        120H
  109. NOCONNCT:    DB    'N'-40H ;^N = Disconnect from phone line    121H
  110. LOGCHR:     DB    'L'-40H ;^L = Send logon            122H
  111. LSTCHR:     DB    'P'-40H ;^P = Toggle printer            123H
  112. UNSAVE:     DB    'R'-40H ;^R = Close input text buffer        124H
  113. TRANCHR:    DB    'T'-40H ;^T = Transmit file to remote        125H
  114. SAVECHR:    DB    'Y'-40H ;^Y = Open input text buffer        126H
  115. EXTCHR:     DB    '^'-40H ;^^ = Send next character        127H
  116. ;
  117. ;
  118.         DS    2        ;                128H
  119. ;
  120. IN$MODCTL1:    IN    MODCTL1 ! RET    ;in modem control port        12AH
  121.         DS    7
  122. OUT$MODDATP:    OUT    MODDATP ! RET    ;out modem data port        134H
  123.         DS    7
  124. IN$MODDATP:    IN    MODDATP ! RET    ;in modem data port        13EH
  125.         DS    31
  126. ;
  127. LOGONPTR:    DW    LOGON        ;for user message.        160H
  128.         DS    6        ;                162H
  129. JMP$GOODBYE:    JMP    GOODBYE     ;                168H
  130. JMP$INITMOD:    JMP    INITMOD     ;go to user written routine    16BH
  131.         RET  !    NOP  !    NOP    ;(by-passes PMMI routine)    16EH
  132.         RET  !    NOP  !    NOP    ;(by-passes PMMI routine)    171H
  133.         RET  !    NOP  !    NOP    ;(by-passes PMMI routine)    174H
  134. JMP$SETUPR:    JMP    SETUPR        ;                177H
  135. JMP$SPCLMENU:    JMP    SPCLMENU    ;                17AH
  136. JMP$SYSVER:    JMP    SYSVER        ;                17DH
  137. JMP$BREAK:    JMP    SENDBRK     ;                180H
  138. ;
  139. ;
  140. ; Do not change the following six lines.
  141. ;
  142. JMP$ILPRT:    DS    3        ;                183H
  143. JMP$INBUF    DS    3        ;                186H
  144. JMP$INLNCOMP:    DS    3        ;                189H
  145. JMP$INMODEM    DS    3        ;                18CH
  146. JMP$NXTSCRN:    DS    3        ;                18FH
  147. JMP$TIMER:    DS    3        ;                192H
  148. ;
  149. ; Clear sequences -- CLREOS is clear to end of screen, CLRSCRN is clear
  150. ; entire screen.  Last entry must be 0.  Any other 0's act as NOP's.
  151. ;
  152. CLREOS:     CALL    JMP$ILPRT    ;                195H
  153.         DB    ESC,4AH,0,0,0    ;                198H
  154.         RET            ;                19DH
  155. ;
  156. CLRSCRN:    CALL    JMP$ILPRT    ;                19EH
  157.         DB    ESC,'T71',0    ; For Royal RGB monitor        1A1H
  158.         RET            ;                1A6H
  159. ;
  160. ;
  161. SYSVER:     CALL    JMP$ILPRT    ;                1A7H
  162.         DB    'Version for Royal 8251-A Chip port 40H'    
  163.         DB    CR,LF,0
  164.         RET
  165. ;
  166. ;
  167. ;
  168. ;-----------------------------------------------------------------------
  169. ;
  170. ; NOTE:  You can change the SYSVER message to be longer or shorter.  The
  171. ;     end of your last routine should terminate by 0400H (601 bytes
  172. ;     available after start of SYSVER) if using the Hayes Smartmodem
  173. ;     or by address 0C00H (2659 bytes) otherwise.
  174. ;
  175. ;-----------------------------------------------------------------------
  176. ;
  177. ; You can put in a message at this location which can be called up with
  178. ; CTL-O if TRANLOGON has been set YES.    You can put in several lines if
  179. ; desired.  End with a 0.
  180. ;
  181. ;
  182. LOGON:      DB    'This is a Royal Alphatronic computer',CR,LF,0
  183. ;
  184. ;=======================================================================
  185. ;
  186. ; This routine allows a 300 ms. break tone to be sent to reset some
  187. ; time-share computers.
  188. ;
  189. SENDBRK:  MVI    A,1FH
  190.       JMP    GOODBYE1
  191. ;.....
  192. ;
  193. ;
  194. ; This routine sends a 300 ms. break tone and sets DTR low for the same
  195. ; length of time to disconnect some modems such as the Bell 212A, etc.
  196. ;
  197. GOODBYE:  MVI    A,15H        ;SEND BREAK, TURN OFF DTR
  198. ;
  199. GOODBYE1: OUT    MODCTL1     ;SEND TO STATUS PORT
  200.       MVI    B,3        ;DELAY ABOUT 300 MS.
  201.       CALL    JMP$TIMER
  202.       MVI    A,07H        ;NORMAL SEND/RECEIVE WITH DTR
  203.       OUT    MODCTL1     ;SEND TO STATUS PORT
  204.       RET
  205. ;
  206. ;  Royal Alphatronic 8251-A USART initialization sequence Port 41H
  207. ;
  208. INITMOD:  MVI    A,0CH
  209.     OUT    MODCTL2
  210.     MVI    A,40H
  211.     OUT    MODCTL2
  212.     MVI    A,4EH
  213.     OUT    MODCTL2
  214.     MVI    A,37H
  215.     OUT    MODCTL2
  216.     RET 
  217. ;
  218. ;
  219. SETUPR: RET
  220. ;
  221. ;           (END OF INITMOD AND SETUP ROUTINES)
  222. ;=======================================================================
  223. ;
  224. ; These routines can be used for your equipment, be sure to end with RET
  225. ; If using the Hayes Smartmodem this is unavailable without a special
  226. ; change.
  227. ;
  228. SPCLMENU: RET
  229. ;        
  230. ;=======================================================================
  231. ;
  232. ;
  233. ; NOTE:  MUST TERMINATE PRIOR TO 0400H (with Smartmodem)
  234. ;                 0BC0H (without Smartmodem)
  235. ;
  236.       END
  237. ;
  238.