home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 31 / CDASC_31_1996_juillet_aout.iso / vrac / tsqlpc11.zip / SENDFILE.LIS < prev    next >
File List  |  1996-04-20  |  21KB  |  436 lines

  1.                            - 1 -
  2. 25-Apr-88 sendfile_doc, sendfile.lis
  3. Document updated 25-Feb-89, 2-Aug-89
  4.  
  5. Professor Timo Salmi
  6. University of Vaasa
  7. P.O. Box 700
  8. FIN-65101 Vaasa
  9. Finland
  10.  
  11.  
  12. SINCLAIR QL <--> PC FILE TRANSFER
  13. =================================
  14.  
  15.    Even if this SENDFILE documentation describes file transfers
  16. between the ill-fated  Sinclair  QL  and  a  PC,  much  of  the
  17. information should be of general interest when considering file
  18. transfers between any home computer and a PC.
  19.    For Sinclair  QL  users  this  file  also  contains  a  list
  20. covering a number of my other QL programs starting from page 5.
  21. If you want  to obtain  programs from  the list,  please direct
  22. these requests to the Quanta librarians, not me.
  23.  
  24.    Two  programs  belong  to   this   set,   SENDFILE_EXE   and
  25. TAKEFILE_EXE, together with this document in SENDFILE_DOC.
  26.  
  27.    The author  shall not be liable to  the user for any direct,
  28. indirect   or  consequential  loss  arising  from  the  use  or
  29. inability  to use of any program  or file howsoever caused. The
  30. (nominal) fee  for  the  QL  programs  does  not  include  user
  31. support.
  32.  
  33.    Comments  of  and  contacts  with  fellow Sinclair QL and PC
  34. users are welcome and encouraged. If you have the  access,  you
  35. can  try  to contact me at Internet email address:  ts@uwasa.fi
  36. My WWW URL is http://www.uwasa.fi/~ts/
  37.  
  38.  
  39. Short Descriptions
  40.  
  41. SENDFILE_EXE
  42. Sends ascii files from QL ser2_ port to PC. Works with Procomm,
  43. MsKermit,  and Telix  well up  to 9600  bauds. Has  proven very
  44. reliable when you get the PC settings right. Use ascii download
  45. in the PC  end  of  things.  Includes  optional  conversion  of
  46. Scandinavian characters å ä ö Å Ä Ö into å ä ö Å Ä Ö.
  47.  
  48. TAKEFILE_EXE
  49. Takes ascii files sent  to ser2_  port from  a PC.  Works  with
  50. Procomm, MsKermit, and Telix, if their settings are right. Baud
  51. rate 300 recommended.  Not entirely  reliable  because  of  the
  52. technical inadequacy of QL ports. PC optional translation of PC
  53. åäöÅÄÖ into  corresponding QL characters.
  54.  
  55.                            - 2 -
  56.  
  57. How it Started
  58.  
  59.    The following  letter, which  I sent  to Quanta  in February
  60. 1988, gives the background of SENDFILE_EXE and TAKEFILE_EXE. (I
  61. never heard about the letter or my cartridge after I sent it to
  62. the former Quanta officials.)
  63.  
  64.    "Finally having had time  for it,  I have  tried my  hand at
  65. transferring data  between Sinclair QL and  a Zenith laptop PC.
  66. Contrary to my fears it turned out easier than expected.
  67.    The physical connection was made between ser2 serial port of
  68. the  QL and COM1 serial port of Zenith. (Don't ask me about the
  69. pins.) To  receive  normal  ascii  files  (not  much  sense  in
  70. transferring  executable QL files to a PC) I used Procomm ascii
  71. downloading. Having  set Zenith  up I  then tried  sending data
  72. from the  QL with QCODE (v4.1)  terminal emulation program, but
  73. the transfer was painstakingly slow, and lost the linefeeds and
  74. Scandinavian characters on the  way.  I  then  tried  the  copy
  75. commands suggested in  Quanta, but got  stuck in the  PC end of
  76. things.
  77.    This was no good.  Next  I  wrote  a  simple  Turbo  Charged
  78. SuperBASIC program,  which writes the source  file to ser2 port
  79. adding  the   linefeeds   and   converting   the   Scandinavian
  80. characters. This transfer  works  quite  well  at  9600  bauds.
  81. Success. Perhaps not the most elegant solution, but it works.
  82.    Transfer in the  other  direction  has  not  been  quite  as
  83. successful (nor as necessary), but manageable, nevertheless. At
  84. 1200 bauds  I first set  up a logfile  in the QL  end of things
  85. using QCODE, and  the  applied  Procomm  and  ascii  upload  in
  86. Zenith. This works reasonably. The scandinavian characters must
  87. be converted, though, prior sending.
  88.    I also  attempted writing  a program  for the  QL to  do the
  89. receiving  (reading from  ser2), but  contrary to  sending this
  90. method  turned out to be error-prone. The programs halts sooner
  91. or later to an XMIT error in reading the QL port. Not much harm
  92. done though,  since in PC to QL  transfer QCODE is fast enough,
  93. even if not so in the opposite direction."
  94.  
  95. ... EOL (end of letter) to Quanta ...
  96.  
  97.    After  that  letter  I  have  (hopefully)  solved  the  file
  98. transfer problem  in  BOTH  directions,  and  the  results  are
  99. sendfile_exe and takefile_exe.
  100.                            - 3 -
  101.  
  102. SENDFILE_EXE
  103.  
  104.    Transfer  from QL to PC seems to be quite easy and free from
  105. trouble after you get your system once (con)figured out.
  106.    To  begin with,  connect your  QL ser2_  port with  a proper
  107. cable to the RS232 port  of  your  PC.  Personally,  I  have  a
  108. Miracle  Systems Modaptor in between my QL and PC, but this may
  109. not  be necessary. As to acquiring  or making the proper cable,
  110. you'll  have to consult your dealer,  or at least your manuals.
  111. The most common  pin connections are  given at the  end of this
  112. chapter.
  113.    Call Procomm communications program (or similar) in your PC.
  114. Next set Procomm baud rate at  the  rate  you  intend  to  use.
  115. Usually  the setting 9600,N,8,1 will work,  but you may have to
  116. experiment depending on  your PC.  It is  advisable to  set the
  117. Procomm  software flow control (XON/XOFF) on, and hardware flow
  118. control off.
  119.    Next, invoke ASCII download in Procomm.
  120.    On  your QL apply EXEC_W SENDFILE_EXE. The program will then
  121. ask  you for the file to be sent, the baud rate (make sure that
  122. the same baud  rates  are  used),  and  whether  you  want  the
  123. Scandinavian characters translated.
  124.    The  transfer should now  get under way.  If everything goes
  125. right, the characters sent  are echoed  both on  the QL  and PC
  126. screens. When  the entire  contents of  the file  have emerged,
  127. press ESC on Procomm to close the file on the PC.
  128.    Scandinavian characters pose  a problem  for us  poor Finns,
  129. since  they are in the 8-bit half on the QL and PC ascii codes,
  130. and what is more, not  even  the  same  for  QDOS  and  MS-DOS.
  131. Therefore  å ä ö Å Ä and Ö are translated into å ä ö Å Ä Ö when
  132. the translation option is  chosen.  If  you  have  to  use  the
  133. Scandinavian  conversion, use Procomm translation table (ALT W)
  134. to convert the latter back into PC Scandinavian characters. The
  135. relevant translations  are  91:142,  92:153,  93:143,  123:132,
  136. 124:148, 125:134.
  137.    Two connection diagrams, courtesy of Mr. Antti Ala-Keturi of
  138. the Vaasa University Computer Centre, are given below:
  139.  
  140.    QL ser2_ 6 pins           PC COM1 25 pins
  141.          1 ----------------------- 7
  142.          2 ----------------------- 3
  143.          3 ----------------------- 2
  144.  
  145.    QL ser2_ 6 pins           PC AT COM1 9 pins
  146.          1 ----------------------- 5
  147.          2 ----------------------- 2
  148.          3 ----------------------- 3
  149.                            - 4 -
  150.  
  151. TAKEFILE_EXE
  152.  
  153.    Transferring data to QL seems  to  be  more  difficult.  The
  154. maximum baud rate which  works is  300 bauds,  and you  have to
  155. pace sending the characters. Proceed as follows.
  156.    Set Procomm  baud  rate  at  300,N,8,1  and  set  "character
  157. pacing" delay to 100 ms in "ascii transfer options".
  158.    Call  EXEX_W TAKEFILE_EXE and give the file name, baud rate,
  159. and whether you want the Scandinavian characters translated. If
  160. the program aborts at this stage (it sometimes will) in an XMIT
  161. error, just call it again.
  162.    On  your PC invoke Procomm upload  option, and use the ascii
  163. upload. If takefile_exe aborts  again,  terminate  the  Procomm
  164. upload  by pressing ESC on the  PC. Call takefile_exe again and
  165. let  it clear the rubbish  from the port, and  then use it once
  166. again. Usually, at least at this stage the system will work (if
  167. not earlier), and you can invoke Procomm upload again.
  168.    The  file is  echoed to  the QL  screen. On  the QL  you can
  169. terminate the  transfer at any  time by pressing  TAB. When the
  170. transfer is  complete, press CTRL Z on  the PC to terminate the
  171. transferred file. Sounds complicated, but it does work.
  172.    Notice, that  if you  terminate the  transfer with  with the
  173. TAB,  there will be some rubbish in  the buffer at the start of
  174. the next  transfer, so it is advisable  to perform a dummy call
  175. of  TAKEFILE_EXE before the next actual transfer. This is easy,
  176. since there is an "again" option in the program.
  177.    In the PC  -->  QL  transfer  the  Scandinavian  translation
  178. should  work without the need  of considering further settings.
  179. (If you  want to delve into  the translation problems, filedump
  180. programs, such  as QL FILEDUMP_EXE and  PC FILEDUMP.EXE, by the
  181. author, may become handy.)
  182.                            - 5 -
  183.  
  184. Other Library Programs by the Author
  185.  
  186. 23/04/1988 21:17:00
  187.  
  188.     CASER_EXE            UTILITY        QUANTA LIB_59 DISK_16
  189. Caser  converts names of files into  upper or lower case. Caser
  190. requires a toolkit with a RENAME command, such as Tony Tebby's.
  191. Files  are selected directly  from a directory  menu. Caser can
  192. also be used for selective deleting of files. Can use ramdisk.
  193.  
  194.     CONDENSE_EXE         UTILITY        QUANTA LIB_35 DISK_12
  195. A  utility to condense SuperBASIC  programs. It removes REMarks
  196. and  deletes REMark-lines  as well  as lines  with a  colon (:)
  197. only.   Furthermore  it  removes  indentations.  The  resultant
  198. program  will be more concise, which is particularly useful for
  199. SUPERCHARGE!
  200.  
  201.     COPIER_EXE           UTILITY        QUANTA LIB_36 DISK_12
  202. Organized, interactive copying  from  one  device  to  another.
  203. Contains  several  options  including  ALL  FILES,  NEW  FILES,
  204. UPDATE, AUTOMATIC and SELECTIVE. Files can be copied or moved.
  205.  
  206.     CRYPTER_EXE          UTILITY        QUANTA DISK_16
  207. For protecting sensitive files  by  rewriting  them  in  secret
  208. code.  User chooses a  password. Same password  both crypts and
  209. decrypts the files. Instructions within the program.
  210.  
  211.     DIFFE_EXE            UTILITY        QUANTA_LIBRARY
  212. Compares the  contents of two files  and finds the differences.
  213. Includes fast  mode and more tolerant  slow mode. Needs Digital
  214. Precision's Turbo  runtime toolkit  RUNTIME_EXTS or  the actual
  215. toolkit.
  216.  
  217.     DRAWLINE             GRAPHICS       QUANTA LIB_59 DISK_16
  218. A SuperBASIC program for drawing lines of two variables on grid
  219. drawn  by the program. For a  demonstration of the program, and
  220. the graphical presentation of  a  linear  programming  problem,
  221. merge    DRAWLINE_DEMO   and   follow   the   instructions   in
  222. DRAWLINE_DOC.
  223.  
  224.     EOLN_EXE             UTILITY        QUANTA LIB_60 DISK_16
  225. Lets  you change the end of marker of a file. Choices are <LF>,
  226. <CR>, and  <LF><CR>. Creates  a new  file leaving  the original
  227. unchanged.  Useful e.g. for certain printers and PASCAL program
  228. development.
  229.                            - 6 -
  230.  
  231.     FACTORS_EXE          MATH           QUANTA LIB_01 DISK_05
  232. Finds  the factors of an integer. Calculates the largest common
  233. divisor, and the smallest common dividend of two integers.
  234.  
  235.     FILEADD_EXE          UTILITY        QUANTA DISK_16
  236. Concatenates  two text-files. That is, adds  to the end of each
  237. row of the first file the corresponding row of the second file.
  238. Blanks can be inserted in between. The most obvious application
  239. is making two-column texts. Also see FILETRIM and FILECUT.
  240.  
  241.     FILECUT_EXE          UTILITY        QUANTA LIB_05 DISK_06
  242. Can  be used to divide large text (not _doc) files into smaller
  243. modules. Useful e.g. prior transmission in nets. Drops trailing
  244. blanks and  special  characters,  and  optionally  omits  blank
  245. lines.
  246.  
  247.     FILEDUMP_EXE         UTILITY        QUANTA LIB_35 DISK_12
  248. Dumps  the contents of a file on screen in ASCII characters and
  249. ASCII  code numbers simultaneously. Prints ASCII 10 (line feed)
  250. in  colour to highlight the lines of  files. A count is kept at
  251. the same time.
  252.  
  253.     FILETRIM_EXE         UTILITY        QUANTA AMON DISK_05
  254. For  extracting an optional  range of columns  from a textfile,
  255. optionally  adding a left margin. As  chosen, trims or pads the
  256. right end of each row of a file.
  257.  
  258.     FIND_EXE             UTILITY        QUANTA DISK_16
  259. Finds a given string from any type of file. Gives the number of
  260. the block  where the string  is found. Useful  as a preliminary
  261. prior  using e.g. Cartridge Doctor patch.  Not very fast. For a
  262. fast, but a less tolerant multifile search use SEARCH_EXE.
  263.  
  264.     FLAGS_EXE            GAMES/EDUC     QUANTA LIB_36 DISK_12
  265. An  educational game where you are shown national flags and you
  266. have to identify each in turn from a multiple choice list.
  267.  
  268.     F_FORM               FUNCTION       QUANTA LIB_35 DISK_12
  269. For formatting output. Resembles the missing print using.
  270.  
  271.     F_USING              FUNCTION       QUANTA LIB_26 DISK_09
  272. A function providing the missing PRINT USING to SuperBASIC. Use
  273. e.g.  statement 110 PRINT F_USING$ ("#####.##", a) to print the
  274. value of the real variable  a  with  two  decimal  places.  See
  275. USING_DOC for more information.
  276.                            - 7 -
  277.  
  278.     HEXAGAME_EXE         GAMES          QUANTA LIB_57 DISK_02
  279. An  educational version  of the  old number-guessing  game. You
  280. have  to find the  hidden hexadecimal (16-base)  number with as
  281. little  guesses and as  fast as you  can. The game  can also be
  282. played in binary, octal, or the easy decimal (10-base).
  283.  
  284.     JSFORMAT             UTILITY        QUANTA LIB_59 DISK_16
  285. Formatting problem  cartridges with  automatic RETRY  on format
  286. failed. Works on JS and MGY  versions  of  the  QL.  Uses  WHEN
  287. ERRor. Can also be used on  AH  and  JH  versions  with  manual
  288. RETRY.
  289.  
  290.     LINEGAME_EXE         GAMES          QUANTA LIB_53 DISK_15
  291. You  have to fit  a line (y=a+kx)  to hit a  number of circles.
  292. Each circle  has a score value inverse  to its size. The player
  293. has three lines  to fit  and the  possibility of  gaining bonus
  294. lines.
  295.  
  296.     LINPREP_EXE          MATH           QUANTA LIB_35
  297. The  preparation code for solving linear programming and linear
  298. goal    programming   problems.   Documented   in   detail   in
  299. LINSOLVE_DOC. Associated program LINSOLVE_EXE.
  300.  
  301.     LINSOLVE_EXE         MATH           QUANTA LIB_35 DISK_12
  302. A   solution  code  for  linear  programming  and  linear  goal
  303. programming problems. Documented  in  detail  in  LINSOLVE_DOC.
  304. Associated program LINPREP_EXE.
  305.  
  306.     LINSOLVE_DOC         MATH/QUILL     QUANTA LIB_35
  307. Quill documentation of the LINSOLVE solutions system for linear
  308. programming  and linear  goal programming  problems. Associated
  309. programs LINPREP_EXE and LINSOLVE_EXE.
  310.  
  311.     MAKEXE_EXE           UTILITY        QUANTA_LIBRARY
  312. Converts a normal  file into  an executable  file. Can  also be
  313. used to  alter the  dataspace of  an executable  file. Requires
  314. Digital  Precision's RUNTIME_EXTS. See Quanta  5/1987 p. 10 for
  315. the  need of conversions because of  a bug in Micro Peripherals
  316. disk drive.
  317.  
  318.     MANAGAME_EXE         GAMES/EDUC     QUANTA LIB_36 DISK_12
  319. A management game for one person. Besides being "one more game"
  320. it  serves   as  a   serious  introduction   into  full-fledged
  321. management games used in teaching business students.
  322.                            - 8 -
  323.  
  324.     PAIVAYS_EXE          CLOCK          QUANTA LIB_01 DISK_05
  325. Multitasking clock giving  the date  in Finnish.  Needs Tebby's
  326. toolkit (sets priority to 1). Run with EXEC (not EXEC_W). There
  327. is also a near version PAIVAYS2_EXE.
  328.  
  329.     RCOPY                UTILITY        QUANTA AMON DISK_05
  330. RCOPY   copy   command   takes   three   parameters:   source%,
  331. destination%  and filename$. 1=mdv1_, 2=mdv2, 3=fdk1_, 4=fdk2_,
  332. 0=scr_. Source = destination allowed,  which  is  handy  for  a
  333. single  diskdrive. Needs CST  ram_bin code. LRUN  RCOPY to load
  334. RCOPY.
  335.  
  336.     RENUMBER_EXE         UTILITY        QUANTA LIB_60 DISK_16
  337. Renumbers  SuperBASIC files  without the  need of  loading them
  338. into memory. Convenient for program development.
  339.  
  340.     SEARCH_EXE           UTILITY        QUANTA LIB_60 DISK_16
  341. Searches  for a string through files.  Wildcards can be used to
  342. select the files to be searched for the string.
  343.  
  344.     SPELLED_EXE          UTILITY        QL_WORLD
  345. An editor for entering and removing words from dictionaries for
  346. the spelling  checker SPELLER_EXE. Requires  a memory expansion
  347. of 512K.
  348.  
  349.     SPELLER_EXE          UTILITY        QL_WORLD (`3)
  350. Spelling   checker  for  listed  Quill  and  other  text-files.
  351. Requires a memory expansion  of  512K.  Dictionary  held  in  a
  352. separate  _dny file. Dictionary can be edited with SPELLED_EXE.
  353. A specialized dictionary SPELLED_DNY accompanies the program.
  354.  
  355.     STATAURU_EXE         STAT           QUANTA LIB_STATPREP
  356. Part of Timo  Salmi's  statistical  package.  Calculates  auto-
  357. correlations  up  to  desired   lag.   Also   calculates   runs
  358. statistics.
  359.  
  360.     STATDIAG_EXE         STAT           QUANTA LIB_STATPREP
  361. Part   of  Timo  Salmi's  statistical  package.  Draws  scatter
  362. diagrams  of the observations.  User can select  the X-axis and
  363. the Y-axis. If user  provides  the  regression  estimates,  the
  364. program also plots residuals and regressed values on request.
  365.  
  366.     STATMEAS_EXE         STAT           QUANTA LIB_STATPREP
  367. Part  of Timo Salmi's statistical package. Standard statistical
  368. measures  and frequency diagram for any of the variables in the
  369. data. Measures include minimum, maximum, mean, median, standard
  370. deviation, variance and kurtosis. See also STATPREP_DOC.
  371.                            - 9 -
  372.  
  373.    STATPREP_EXE          STAT     QUANTA LIB_STATPREP DISK_13
  374. Part  of Timo Salmi's statistical package.  An editor of a kind
  375. used for entering  the  data  for  the  associated  statistical
  376. programs. Maximum  10 variables  with 200  observations (each).
  377. See STATPREP_DOC for further information on the package.
  378.  
  379.     STATPREP_DOC         STAT/QUILL     QUANTA LIB_STATPREP
  380. Quill   documentation  of  Timo  Salmi's  statistical  package.
  381. Associated  programs STATPREP_EXE,  STATTRAN_EXE, STATMEAS_EXE,
  382. STATRCOR_EXE,  STATAURU_EXE, STATREGR_EXE, STATDIAG_EXE and the
  383. menu driver STATMENU.
  384.  
  385.     STATRCOR_EXE         STAT           QUANTA LIB_STATPREP
  386. Part  of Timo Salmi's statistical  package. Calculates both the
  387. usual   (Pearson's)   correlation    coefficients    and    the
  388. (non-parametric) Spearman's rank correlation coefficients. Also
  389. gives ranks for the observations of any of the variables.
  390.  
  391.     STATREGR_EXE         STAT           QUANTA LIB_STATPREP
  392. Part   of  Timo   Salmi's  statistical   package.  Multivariate
  393. regression  on   the  data  prepared   with  STATPREP_EXE  (and
  394. STATTRAN_EXE).
  395.  
  396.     STATTRAN_EXE         STAT           QUANTA LIB_STATPREP
  397. Part of Timo  Salmi's  statistical  package.  Used  for  making
  398. transformations on  observations  prepared  with  STATPREP_EXE.
  399. Transformations  include taking  logarithms, raising  to power,
  400. taking roots, scaling, and multiplying between observations.
  401.  
  402.     TRANSLATE_EXE        UTILITY        QUANTA LIB_05 DISK_06
  403. Translates the non-scandinavian characters  åäöÅÄÖ  of  a  text
  404. file into their scandinavian counterparts  åäöÅÄÖ.
  405.  
  406. TURBOCOPY_EXE            UTILITY        NOT YET IN
  407. Selective  fast copying. Can copy within a single device, which
  408. is  very useful  for single  diskdrive systems.  Loads programs
  409. into memory, and downloads  then  onto  destination.  Selective
  410. delete incorporated. Caution required because of QDOS bugs.
  411.  
  412.     TURBODENSE_EXE       UTILITY        QUANTA LIB_26 DISK_09
  413. Another utility to condense  SuperBASIC  programs.  Works  like
  414. CONDENSE_EXE  but is about three times faster. Furthermore does
  415. not delete REMark + and REMark -, which indicate threaded code.
  416.  
  417.     TYPEVADERS_EXE       GAMES          QUANTA AMON DISK_05
  418. Prevent the  invading characters  from reaching  the right-hand
  419. side  of the screen by typing them. Makes you familiar with the
  420. QL keyboard and fast typing.
  421.                            - 10 -
  422.  
  423.     TYPE_EXE             UTILITY        QUANTA LIB DISK_15
  424. Displays  file(s)  on   screen.  Wildcards   can  be   used  in
  425. file-names.
  426.  
  427.     WITPIN_EXE           GAMES          QUANTA LIB_36 DISK_12
  428. A game  of wit where you have to  remove pins from the board by
  429. moving a pin over an adjacent pin.
  430.  
  431.     WORDLIST_EXE         UTILITY        QUANTA LIB_36 DISK_12
  432. List the words from  any  text-file.  Option  for  alphabetical
  433. order. Useful  for checking the  spelling of a  Quill file. For
  434. bigger files there is a BIGWORDLIST_EXE program available.
  435.  
  436.