home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / club100 / ref / ba01j.do < prev    next >
Text File  |  2006-10-19  |  4KB  |  132 lines

  1.  
  2.  Title: MODEM (MDM)
  3.  
  4.  
  5. Some BASIC commands require that you signify the modem configuration.  The 
  6. baud rate is set to 300 by default.  The rest of the configuration consists of 
  7. a four character string of the pattern (wpbs): 
  8.  
  9.  w - Word Length: This is a number from 6 to 8, where 6=6bits; 7=7bits; 
  10.                   8=8bits. 
  11.  
  12.  p - Parity: either E,O,I, or N, where E=even; O=odd; I=ignore; N=none
  13.  
  14.  b - Stop Bits: Either 1 or 2, where 1=1 stop bit; 2=2stop bit.
  15.  
  16.  s - Xon/Xoff Status: Either E or D, where E=enable; D=disable 
  17.  
  18.  
  19. CLOSEfilenumberlist
  20.  Closes the files OPEN'ed as filenumber. 
  21.  
  22.  
  23. EOF(filenumber)
  24.  Tests for an end-of-file condition on the modem file OPEN'ed as filenumber.  
  25.  The function returns a "logical" answer, either "true" (-1) if you have 
  26.  reached the end of the file, or else "false" (0) if you have not reached the 
  27.  end of the file. 
  28.  
  29.  
  30. INPUT#filenumber,variablelist
  31.  Inputs data sequentially from the modem file OPEN'ed as filenumber. 
  32.  
  33.  
  34. INPUT$(numericexpression,filenumber)
  35.  Returns a string of a length given by numericexpression from the modem file 
  36.  OPEN'ed as filenumber. 
  37.  
  38.  
  39. LINEINPUT#filenumber,stringvariable
  40.  Reads a line of text from the device.
  41.  
  42.  
  43. LOAD"MDM:filename",R
  44.  Loads a BASIC program from the modem .  If R is present, BASIC runs the 
  45.  program after it has been loaded. 
  46.  
  47.  
  48. MAXFILES
  49.  Stores the current maximum number of files.  You may access MAXFILES line any 
  50.  numeric variable. 
  51.  
  52.  
  53. MDMONorOFForSTOP
  54.  Enables or disables the ONMDM interrupt.
  55.  
  56.  
  57. MERGE"MDM:filename"
  58.  Merges the lines from the incoming file with the lines of the current 
  59.  program. 
  60.  
  61.  
  62. ONMDMGOSUBlinenumber
  63.  Defines an interrupt subroutine for incoming modem communications.
  64.  
  65.  
  66. OPEN"MDM:filename"FORmodeASfilenumber
  67.  Allocates a buffer, filenumber, for a modem file called filename.  Mode can 
  68.  be OUTPUT, specifying data will be transmitted out the modem, or INPUT, 
  69.  specifying data will be received from the modem. 
  70.  
  71.  
  72. PRINT#filenumber,expressionlist
  73.  Writes the values of expressionlist to the modem file OPEN'ed as filenumber. 
  74.  
  75.  
  76. PRINT#filenumber,USING"format";expressionlist
  77.  Formats the data in expressionlist and sends it to the modem file OPEN'ed as 
  78.  filenumber.  Format consists of one of more of the following "field 
  79.  specifiers": 
  80.  
  81. Prints first string character.
  82.  PRINT#1,USING"!";"Tandy"
  83.  
  84. Prints 2+n characters from a string.
  85.  PRINT#1,USING"\\";"Tandy"
  86.  
  87. Print one digit for each #.
  88.  PRINT#1,USING"#####";5
  89.  
  90. Inserts the algebraic sign of the number.
  91.  PRINT#1,USING"+####";-13
  92.  
  93. Inserts a minus sign either at the beginning or end of negative numbers.  
  94.  PRINT#1,USING"-####";14 
  95.  
  96. Converts leading blanks to leading asterisk blanks.
  97.  PRINT#1,USING"**#####";145 
  98.  
  99. Inserts a dollar sign to the immediate left of the formatted number.  
  100.  PRINT#1,USING"$$#####";450 
  101.  
  102. Changes leading spaces to asterisks except for the space to the immediate left 
  103. of the number, where is inserts a dollar sign. 
  104.  PRINT#1,USING"**$###";12 
  105.  
  106. Inserts a decimal point.
  107.  PRINT#1,USING"#####.##";14.5
  108.  
  109. Inserts a comma before every three printed digits to the left of the decimal 
  110. point. 
  111.  PRINT#1,USING"#########,";14432
  112.  
  113. Prints the number in exponential format.
  114.  PRINT#1,USING"###.##^^^^";342200 
  115.  
  116.  
  117. RUN"MDM:filename",R
  118.  Clears all variables, loads the BASIC program called filename from the modem, 
  119.  and then executes the program.  If R is present, BASIC keeps all open files 
  120.  open.  If R is omitted, BASIC closes all open file before loading filename. 
  121.  
  122.  
  123. SAVE:MDM:filename",A
  124.  Writes the current BASIC program out the modem in ASCII format.  
  125.  
  126.  
  127. TAB(numericexpression)
  128.  Writes numericexpression spaces before writing the next data item.  
  129.  Numericexpression spaces between 0 and 255. 
  130.  
  131. <EOF>
  132.