SIO Command $64 TCP Disconnect - FujiNetWIFI/fujinet-firmware GitHub Wiki
TCP Disconnect ($64) ['d']
Description
Disconnect the TCP connection.
Proposed Change: Add support for TCP socket slot via DAUX1 to complement proposed change for TCP Connect
Parameters
DCB | Value |
---|---|
DDEVIC | $70 |
DUNIT | $01 |
DCOMND | $64 |
DSTATS | 0x00 |
DBUF | NULL |
DTIMLO | 0x0F |
DBYT | 0 |
DAUX1 | Currently Unused |
DAUX2 | Currently Unused |
Examples
Atari BASIC
CC65
// Disconnect TCP connection
OS.dcb.ddevic=0x70;
OS.dcb.dunit=1;
OS.dcb.dcomnd='d';
OS.dcb.dstats=0x00;
OS.dcb.dbuf=NULL;
OS.dcb.dtimlo=0x0F;
OS.dcb.dbyt=0;
OS.dcb.daux=0;
siov();
Atari BASIC
7000 REM BEGIN UDP
7010 DCOMND=ASC("d")
7020 DSTATS=0:REM NO IN OR OUT
7030 DBUFLO=0:DBUFHI=0
7040 DTIMLO=15
7050 DBYTLO=0:DBYTHI=0
7060 DAUX2=0
7070 DAUX1=0
7080 GOSUB 8000:REM CALL SIO
7090 RETURN
8000 REM DO SIO CALL
8010 DCB=768
8020 DDEVIC=112:REM $70
8030 DUNIT=1:REM STILL $70
8040 POKE DCB,DDEVIC
8041 POKE DCB+1,DUNIT
8042 POKE DCB+2,DCOMND
8043 POKE DCB+3,DSTATS
8044 POKE DCB+4,DBUFLO
8045 POKE DCB+5,DBUFHI
8046 POKE DCB+6,DTIMLO
8047 POKE DCB+7,DRESVD
8048 POKE DCB+8,DBYTLO
8049 POKE DCB+9,DBYTHI
8050 POKE DCB+10,DAUX1
8051 POKE DCB+11,DAUX2
8060 X=USR(ADR("h Yd`")):REM JSR SIOV
8070 RETURN
See Also
- TCP Connect
- TCP Read
- TCP Write
- TCP Status