Skip to content

N: SIO Command 'C' Close

Thomas Cherryhomes edited this page Nov 26, 2020 · 7 revisions

N: SIO Command CLOSE ($43) ['C']

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.

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

Parameters

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

Examples

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();
}

See Also

Put other related command links here.

Clone this wiki locally