home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 9
/
MEDIASHARE_09.ISO
/
basic
/
baswiz18.zip
/
BW$BAS.ZIP
/
TCQ.BAS
< prev
next >
Wrap
BASIC Source File
|
1992-08-29
|
1KB
|
35 lines
' +----------------------------------------------------------------------+
' | |
' | BASWIZ Copyright (c) 1990-1992 Thomas G. Hanlin III |
' | |
' | The BASIC Wizard's Library |
' | |
' +----------------------------------------------------------------------+
DECLARE SUB TCDone0 ()
DECLARE SUB TCInit0 (BYVAL Port%, BYVAL InBuf%, BYVAL OutBuf%, ErrCode%)
DECLARE SUB TCParms0 (BYVAL Parity%, BYVAL WordLength%, BYVAL StopBits%)
DEFINT A-Z
SUB TCDone
TCDone0
junk& = SETMEM(999999)
END SUB
SUB TCInit(Port, InBuf, OutBuf, ErrCode)
junk& = SETMEM(-(CLNG(InBuf) + CLNG(OutBuf) + 64&))
TCInit0 Port, InBuf, OutBuf, ErrCode
END SUB
SUB TCParms(Parity$, WordLength%, StopBits%)
SELECT CASE UCASE$(LEFT$(Parity$, 1))
CASE "S": Parity = 4 ' space (parity = 0)
CASE "M": Parity = 3 ' mark (parity = 1)
CASE "E": Parity = 2 ' even parity
CASE "O": Parity = 1 ' odd parity
CASE ELSE: Parity = 0 ' no parity
END SELECT
TCParms0 Parity, WordLength, StopBits
END SUB