home *** CD-ROM | disk | FTP | other *** search
- ' +----------------------------------------------------------------------+
- ' | |
- ' | BASWIZ Copyright (c) 1990-1993 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
-