home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1999 August
/
Chip_1999-08_cd.bin
/
sharewar
/
wscmclib
/
MODULE16.BAS
< prev
next >
Wrap
BASIC Source File
|
1998-08-09
|
682b
|
37 lines
'
' VBA (EXCEL/ACCESS/WORD) Module Code
'
Const Port = COM1
Function OpenPort ()
Dim Code As Integer
Code = SioReset(Port, 512, 512)
Code = SioBaud(Port, Baud9600)
Code = SioParms(Port, NoParity, OneStopBit, WordLength8)
Code = SioDTR(Port, SET_LINE)
OpenPort = Code
End Function
Function ClosePort()
ClosePort = SioDone(Port)
End Function
Function GetByte()
GetByte = SioGetc(Port)
End Function
Function PutAT()
Dim Code As Integer
Code = SioPutc(Port, Asc("A"))
Code = SioPutc(Port, Asc("T"))
PutAT = SioPutc(Port, 13)
End Function
Function PutByte (TheByte)
Dim Code As Integer
Code = SioPutc(Port, TheByte)
PutByte = Code
End Function