SIO Command $E0 Get Host Prefix - FujiNetWIFI/fujinet-firmware GitHub Wiki

This is a command for Device $70 - The FujiNet Device itself (see SIO-Commands-for-Device-ID-$70).

Get Host Prefix

Description

Causes the FujiNet to return the current directory prefix for the given host slot (DAUX1) in the buffer specified.

Parameters

DCB Value
DDEVIC $70
DUNIT $01
DCOMND $E0
DSTATS $40
DBUF Pointer to 256 byte buffer
DTIMLO $FE
DBYT 256
DAUX1 Host Slot
DAUX2 Not used

Examples

CC65


unsigned char prefix[256];

/**
 * Ask fujinet for host prefix for given slot
 */
void fuji_get_host_prefix(unsigned char slot)
{
  OS.dcb.ddevic=0x70;
  OS.dcb.dunit=1;
  OS.dcb.dcomnd=0xE0;
  OS.dcb.dstats=0x40;
  OS.dcb.dbuf=prefix;
  OS.dcb.dtimlo=0xFE; // Max timeout
  OS.dcb.dbyt=256;
  OS.dcb.daux1=slot; // Host slot 1
  siov();
}