home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.whtech.com
/
ftp.whtech.com.tar
/
ftp.whtech.com
/
club100
/
ref
/
ba01j.do
< prev
next >
Wrap
Text File
|
2006-10-19
|
4KB
|
132 lines
Title: MODEM (MDM)
Some BASIC commands require that you signify the modem configuration. The
baud rate is set to 300 by default. The rest of the configuration consists of
a four character string of the pattern (wpbs):
w - Word Length: This is a number from 6 to 8, where 6=6bits; 7=7bits;
8=8bits.
p - Parity: either E,O,I, or N, where E=even; O=odd; I=ignore; N=none
b - Stop Bits: Either 1 or 2, where 1=1 stop bit; 2=2stop bit.
s - Xon/Xoff Status: Either E or D, where E=enable; D=disable
CLOSEfilenumberlist
Closes the files OPEN'ed as filenumber.
EOF(filenumber)
Tests for an end-of-file condition on the modem file OPEN'ed as filenumber.
The function returns a "logical" answer, either "true" (-1) if you have
reached the end of the file, or else "false" (0) if you have not reached the
end of the file.
INPUT#filenumber,variablelist
Inputs data sequentially from the modem file OPEN'ed as filenumber.
INPUT$(numericexpression,filenumber)
Returns a string of a length given by numericexpression from the modem file
OPEN'ed as filenumber.
LINEINPUT#filenumber,stringvariable
Reads a line of text from the device.
LOAD"MDM:filename",R
Loads a BASIC program from the modem . If R is present, BASIC runs the
program after it has been loaded.
MAXFILES
Stores the current maximum number of files. You may access MAXFILES line any
numeric variable.
MDMONorOFForSTOP
Enables or disables the ONMDM interrupt.
MERGE"MDM:filename"
Merges the lines from the incoming file with the lines of the current
program.
ONMDMGOSUBlinenumber
Defines an interrupt subroutine for incoming modem communications.
OPEN"MDM:filename"FORmodeASfilenumber
Allocates a buffer, filenumber, for a modem file called filename. Mode can
be OUTPUT, specifying data will be transmitted out the modem, or INPUT,
specifying data will be received from the modem.
PRINT#filenumber,expressionlist
Writes the values of expressionlist to the modem file OPEN'ed as filenumber.
PRINT#filenumber,USING"format";expressionlist
Formats the data in expressionlist and sends it to the modem file OPEN'ed as
filenumber. Format consists of one of more of the following "field
specifiers":
Prints first string character.
PRINT#1,USING"!";"Tandy"
Prints 2+n characters from a string.
PRINT#1,USING"\\";"Tandy"
Print one digit for each #.
PRINT#1,USING"#####";5
Inserts the algebraic sign of the number.
PRINT#1,USING"+####";-13
Inserts a minus sign either at the beginning or end of negative numbers.
PRINT#1,USING"-####";14
Converts leading blanks to leading asterisk blanks.
PRINT#1,USING"**#####";145
Inserts a dollar sign to the immediate left of the formatted number.
PRINT#1,USING"$$#####";450
Changes leading spaces to asterisks except for the space to the immediate left
of the number, where is inserts a dollar sign.
PRINT#1,USING"**$###";12
Inserts a decimal point.
PRINT#1,USING"#####.##";14.5
Inserts a comma before every three printed digits to the left of the decimal
point.
PRINT#1,USING"#########,";14432
Prints the number in exponential format.
PRINT#1,USING"###.##^^^^";342200
RUN"MDM:filename",R
Clears all variables, loads the BASIC program called filename from the modem,
and then executes the program. If R is present, BASIC keeps all open files
open. If R is omitted, BASIC closes all open file before loading filename.
SAVE:MDM:filename",A
Writes the current BASIC program out the modem in ASCII format.
TAB(numericexpression)
Writes numericexpression spaces before writing the next data item.
Numericexpression spaces between 0 and 255.
<EOF>