[Coco] Rs232 Pack support for VCC

phil pt ptaylor2446 at gmail.com
Sat Feb 29 03:54:09 EST 2020


Most object programming languages like Vb.net supports objects, objects
like timer can be used to prevent data overflow errors.

1. defined memory address to temp hold the incoming data in a buffer.

2. Set the ip address and port number to listen on the winsock connection.

3. As data is being received from the winsock the information is stored in
the windows buffer.

4. Timer events are triggered by the intervals when they are triggered the
programs checks the rs232 pack buffer to se if there is any available space.

5. If any buffer space is available some of the data is sent to the Rs232
pack.

6. The data sent is removed from the buffer.

7. Checks carrier see below.

8 . Checks to see if any data needs to be sent out. If so, the Rs232 pack
writting in dll pull the information from the Rs232 pack buffer and shoves
it to the Winsock connection.

9. If the winsock connect is lost which is detected by winsock control then
the rs232 pck carrier detect is changed to reflect the true or false
carrier detect status.

Welcome to 7HE EdGE, located in CyBERSpACE!

Running AmiExpress v5.2.2 Copyright ⌐2018/2019 Darren Coles
Original Version (C)1992-95 LightSpeed Technologies Inc.
Registration oRdYNe. You are connected to Node 1 at 19200 baud
Connection occured at Fri 28-Feb-20 17:24:25.

Check for Carrier

110 z = peek(65385)
120 z = z and 32
130 if Z = 0 Goto 160
140 print "Carrier is present"
150 end
160 Print "No Carrier"

Transmit Data

200 A = peek(65385)
210 a = a and 16          Transmit holding registry entry
220 If A = 0 then 200     Buffer is not empty
230 Poke 65384,d          D has data byte

Receive Data

300 A = Peek(65385)       Read status register
310 B = A and 8           Receive register full
320 If B = 0 then 300     No data Yet
330 E = A and 7           Check for errors
340 If E = 0 Then 400     No Errors
350 If E = 1 Then 370     Parity Error
355 if E = 2 then 300     Framing Error
360 {rint "Overrun Error"   ' Can be controlled by using timer events in
the dll
365 end
370 Print "parity error"
375 end
380 print "Framing error"
390 end
400 D = Peek (65384)


<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>


More information about the Coco mailing list