SIO Command $E2 Set Filename for Device Slot - FujiNetWIFI/fujinet-firmware GitHub Wiki
This is a command for Device $70 - The FujiNet Device itself (see SIO-Commands-for-Device-ID-$70).
Set Filename for Device Slot ($E2)
Description
Sets the filename for a given device slot.
DAUX1 specifies the device slot to perform the operation on.
DAUX1 value 0x1A
selects the cassette tape slot.
DAUX2 specifies the host slot and the mount mode options (READ or WRITE).
Bits 0-3: 0 = READ, 1 = WRITE
Bits 4-7: Host slot (0-7)
Parameters
DCB | Value |
---|---|
DDEVIC | $70 |
DUNIT | $01 |
DCOMND | $E2 |
DSTATS | $80 |
DBUF | Pointer to 256 bytes containing path, NUL terminated |
DTIMLO | $0F |
DBYT | 256 |
DAUX1 | Slot $00-$07 for disks, $1A for tape |
DAUX2 | Host slot and mount mode options |
Examples
CC65
/**
* Set filename for device slot
*/
void fuji_sio_set_filename_for_device_slot(unsigned char slot, const char* filename)
{
OS.dcb.ddevic=0x70;
OS.dcb.dunit=1;
OS.dcb.dcomnd=0xE2;
OS.dcb.dstats=0x80;
OS.dcb.dbuf=filename;
OS.dcb.dtimlo=0x0F;
OS.dcb.dbyt=256;
OS.dcb.daux1=slot;
OS.dcb.daux2=0;
siov();
}