Skip to content

N: SIO Command 'C' Close

Mike Kelley edited this page Jan 23, 2026 · 8 revisions

SIO Command Close ($43) ['C']

This is a command for Devices $71-$78 - The N: Device (see SIO-Commands-for-Device-IDs-$71-to-$78).

Description

Close the N: device pointed to by DUNIT. This immediately closes the protocol instance on the ESP, which does any housekeeping required, such as closing connections and deallocating buffers.

Warning

This does not automatically flush any pending write buffers. You must do that yourself, at this level.

Parameters

ADAM

Parameters

  • Device 09 to 0C
  • Use AdamNET Write (EOS WRITE CHARACTER DEVICE)
Offset Value
0 'C'

ATARI

DCB Value
DDEVIC $71
DUNIT $01 - $04
DCOMND $43 'C'
DSTATS $00
DBUF NULL
DTIMLO $0F
DBYT 0
DAUX1 0
DAUX2 0

Examples

ATARI

Atari BASIC

REM Close the channel
CLOSE #1

CC65

/**
 * io_done() - Called to close I/O
 */
void io_done(void)
{
  OS.dcb.ddevic=0x71;
  OS.dcb.dunit=1;
  OS.dcb.dcomnd='C';
  OS.dcb.dstats=0x00;
  OS.dcb.dbuf=0;
  OS.dcb.dbyt=0;
  OS.dcb.daux=0;
  siov();
}

COLECO ADAM

Z88DK C

#define NET_DEV 0x09

void close()
{
      /* Close currently open network connection */
      eos_write_character_device(NET_DEV,"C",1);
}

See Also

Put other related command links here.

Clone this wiki locally