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 / STARTKIT / PIPMODEM.DOC < prev    next >
Text File  |  2000-06-30  |  7KB  |  154 lines

  1.             PIPMODEM.DOC
  2.            P. L. Kelley - 10/29/82
  3.  
  4.     PIPMODEM.ASM is a routine to modify CP/M-80's PIP (1) to
  5. become a communications terminal program as well as to download
  6. to your disk a text file from another computer.
  7.  
  8.     PIPMODEM.ASM is short enough that it can be easily typed
  9. in if you have a printed copy or be hand copied from a display
  10. terminal while in communication with a remote computer. The
  11. comments in lower case do not need to be copied. Normally only
  12. three or four equates need to be modified. 88 bytes of object
  13. code are generated.
  14.  
  15.     PIPMODEM.ASM makes use of PIP's :INP (input) feature. The
  16. :INP function is invoked by typing UFN=:INP to PIP (UFN stands
  17. for Unambiguous File Name). PIP reserves locations 106H-108H for
  18. a jump to a user written routine and locations 10AH-1FFH are
  19. reserved for the user written routine. The user routine RETs
  20. after loading location 109H with an input byte; PIP then stores
  21. the byte in its memory buffer and calls location 106H to get the
  22. next byte. If the user routine puts control-Z in 109H and RETs,
  23. PIP will write the memory buffer to the disk file and return to
  24. the command level.
  25.  
  26.     The routine is written so that the memory buffer is only
  27. loaded after control-O is typed; this allows you to log on to the
  28. remote system and search for the file before opening the memory
  29. buffer. To write the file and exit you simply type control-Z.
  30.  
  31.     You make the modified version of PIP as follows:
  32.  
  33.         1) Use a text editor to make a disk file of
  34.            PIPMODEM.ASM, be sure to change the four
  35.            modem equates for you computer, note that
  36.            validity checks are given at the end of
  37.            this file,
  38.  
  39.         2) Do the following
  40.     
  41.             A>asm pipmodem.aaz<cr>
  42.             CP/M ASSEMBLER - VER 2.0
  43.             015C
  44.             000H USE FACTOR
  45.             END OF ASSEMBLY
  46.     
  47.             A>ddt pip.com<cr>
  48.             NEXT  PC
  49.             1E00 0100
  50.             -ipipmodem.hex<cr>
  51.             -r<cr>
  52.             NEXT  PC
  53.             1E00 0000
  54.             -g0<cr>
  55.  
  56.             A>save 29 pipmodem.com<cr>
  57.  
  58. The lower case characters are your inputs, where <cr> stands for
  59. carriage return, and the upper case characters are the computer's
  60. responses.
  61.  
  62.  
  63.     This routine should work on the majority of machines
  64. running CP/M. However, some warning needs to be given concerning
  65. the general validity of PIPMODEM.ASM; unfortunately, in this
  66. pluralistic world it is impossible to write a routine that is
  67. universal. Some microcomputer's have hardware which require
  68. memory mapped I/O to modems; the file will then have to be
  69. modified to load and store to memory locations instead of
  70. inputting and outputting to ports. In addition, some BIOSs poll
  71. the ports on keyboard status checks and put the input byte from
  72. the ports into a buffer where it will be lost to PIP. Other
  73. systems may use interrupts on ported input; again the input byte
  74. is buffered and lost to PIP. There are ways around these problems
  75. but the solutions vary.
  76.     
  77.     Not all computers you may connect your micro to behave in
  78. the way the this routine assumes; however, Bulletin Board Systems
  79. (BBSs) and Remote CP/Ms (RCP/Ms) do. If the computer you connect
  80. to doesn't echo what you send, you will need to add some code to
  81. echo to your console what you type in; this can be readily
  82. accomplished by adding a call to the BIOS console output vector
  83. after the line labeled MODOUT. If you make the line of the form
  84. CNOUT2 CALL $-$, add SHLD CNOUT2+1 just before the JMP OLDSTRT
  85. line. There are also systems to which you might connect which
  86. don't send a linefeed as well as echo a carriage return after a
  87. carriage return is sent to them; this requires additional code to
  88. test for your input of a carriage return and send a linefeed as
  89. well as the carriage return. In order to keep the program simple,
  90. to avoid getting hung up if the modem is not working properly and
  91. because no one can type as fast as a modem sends characters, no
  92. transmit ready checking was implemented. Unfortunately, the
  93. computer works faster than the modem and unless you do transmit
  94. ready checking the linefeed it sends after the carriage return
  95. will be lost. Finally, some systems require the parity bit to be
  96. set on any byte sent to them; add ORI 80 before you output but be
  97. sure to strip parity back off before you store at 109H or locally
  98. echo.
  99.  
  100.     Perhaps the first thing you will want to do after you
  101. have the modified version of PIP working is to communicate with
  102. an RCP/M and download the short (~10K) file MBOOT.ASM. PIPMODEM
  103. can only be used to obtain, without loss of characters, text
  104. files up to the length of PIP's memory buffer, thus, the
  105. requirement that the file transferred be short. MBOOT does error
  106. checking and can be used to obtain files of any size and type
  107. assuming the other computer has the appropriate software. Once
  108. you have MBOOT working it is then desirable to obtain an even
  109. more versatile modem program from an RCP/M, such as MODEM7XX or
  110. MODEM2XX (the X's stand for version numbers).
  111.  
  112.     RCP/Ms are remote CP/M microcomputers which you can call
  113. to obtain public domain software; you will find that the latest
  114. versions of popular, useful software are available. On your end
  115. you normally use MBOOT or MODEM7XX/2XX in conjunction with XMODEM
  116. on the RCP/M. The numbers of RCP/Ms can usually be found on
  117. computer BBSs.
  118.  
  119.     As an example of PIPMODEM's use, communication with an
  120. RCP/M, including transfer of a short text file, will be
  121. described. To use a modem you must first configure your modem
  122. ports to the proper settings; typically, 300 baud, 8 bit word, 1
  123. stop bit, no parity. Some computers come with configuration
  124. programs which do this for you in a simple fashion. Next, do
  125. PIPMODEM MBOOT.ASM=INP: (assuming you want MBOOT.ASM). Call up an
  126. RCP/M, connect your modem to the telephone and hit RETURN a few
  127. times. If the remote computer responds you will get a message
  128. and, depending on the system, the RCP/M operating program may go
  129. directly to CP/M so that it appears that you are at the remote
  130. system's console or you may be led to CP/M through a bulletin
  131. board program. After you have searched the disks/user areas for
  132. MBOOT.ASM, do control-O then TYPE MBOOT.ASM. MBOOT.ASM will be
  133. displayed on your console. When the type out is finished and the
  134. remote system gives you its CP/M prompt, type control-Z.
  135. MBOOT.ASM will then be written to your disk. Hang up the
  136. telephone; the RCP/M operating program will sense the loss of
  137. your modem carrier and will recycle for the next caller. Be sure
  138. and edit out the extraneous commands, prompts, etc. at the
  139. beginning and end of the file.
  140.  
  141.     Before you assemble PIPMODEM.ASM make a note of the
  142. following checks on the validity of your copy.
  143.  
  144.     There are:
  145.         1) 8  EQUates,
  146.         2) an ORG statement,
  147.         3) 40 lines of assembly code, and
  148.         4) an END statement.
  149.  
  150.      The file generates code up to the location before 15CH.
  151.  
  152.  
  153. (1) CP/M-80, PIP, ASM, and DDT are products of Digital Research Inc.
  154.