home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
MODEM
/
BONEZ.ZIP
/
BONE$.WAS
< prev
next >
Wrap
Text File
|
1993-11-23
|
4KB
|
124 lines
;*****************************************************************************
;
; SCRIPT TO USE BEAR BONE$ WITH PROCOMM FOR WINDOWS
;
; Function of the script is to "fetch" the current port settings and
; then pass them to BEAR BONE$, using the /BDR= and /BTS= options.
; These options force BEAR BONE$ to open the port at the desired
; baud rate and bit settings.
;
;*****************************************************************************
proc main
string boneparm ; store parameter input line
;vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
;
; Change the following line to reference your BONE$.EXE program if you
; have installed BEAR BONE$ to a different path.
string bonecommandline="c:\bone$\bone$.exe " ; start of command line
;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
string setbts=" /BTS=" ; command line options for BEAR BONE$
string setbdr=" /BDR="
string dabaud ; store baud rate
string dabit ; store data bits
string dasbit ; store stop bits
string daparity ; store parity
long bb_baud ; port baud rate to be fetched
integer bb_databit ; port data bits to be fetched
integer bb_parity ; port parity to be fetched
integer bb_stopbit ; port stop bits to be fetched
;*****************************************************************************
;
; Fetch commands to get current port settings that will be
; passed to Bear Bone$.
;
fetch baudrate bb_baud ; fetches baud rate
fetch port databits bb_databit ; fetches data bits
fetch port stopbits bb_stopbit ; fetches stop bits
fetch port parity bb_parity ; fetches parity
;*****************************************************************************
;
; Convert fetched values to strings.
;
ltoa bb_baud dabaud
itoa bb_databit dabit
itoa bb_stopbit dasbit
;*****************************************************************************
;
; Gives the number returned by the "fetch port parity" command
; the corresponding alpha value.
;
switch bb_parity
case 0
daparity="N"
endcase
case 1
daparity="O"
endcase
case 2
daparity="E"
endcase
case 3
daparity="M"
endcase
default
daparity="S"
endcase
endswitch
;******************************************************************************
;
; concatenate the strings to implement /BDR= and /BTS= options.
;
strcat setbdr dabaud
strcat setbts dabit
strcat setbts daparity
strcat setbts dasbit
;******************************************************************************
;
; User inputs the startup string with out having to enter
; /BDR and /BTS options.
;
; Here's what user will need to type at the prompt:
;
; <parm-file> PUT|GET <pc-file> <mf-file> <mf-options>
;
sdlginput "Parameter Entry" "Enter Parameters" boneparm
;******************************************************************************
;
; Concatenate the strings for the final parameter line
;
strcat bonecommandline boneparm
strcat bonecommandline setbdr
strcat bonecommandline setbts
;******************************************************************************
;
; Go ahead and invoke BEAR BONE$.
;
; * Make sure that the device contention is set to "never warn"
; in the 386 Enhanced options of Window's control panel.
;
dos bonecommandline
endproc ; end of script