Tvùrce webu je i pro tebe! Postav tøeba web. Bez grafika. Bez kodéra. Hned.
wz

<< Back

cesky: , English:

DEV

System devices

Names of system devices:

When opening device using OpenDevice function, the device name does not terminate with a colon : as it is with file functions. The size of the letters in the name of the device does not matter.


OpenDevice - open device

INPUT:
CL = length of device name
SI = device name (without ":")
DI = pointer to destination FILE structure

OUTPUT:
CY = error, invalid device


DevCheck - device check

INPUT:
BL = bit 0..3:
device type (bit 3: 0=block/1=char device), bit 4..7: device index (0..15)

OUTPUT:
CY = invalid device


DevSize - get device media size

INPUT:
BL = bit 0..3:
device type (bit 3: 0=block/1=char device), bit 4..7: device index (0..15)

OUTPUT:
DX:AX = media size (0 on error)
CY = invalid device (or character device, DX:AX = 0 on error)


DevRead - device read

INPUT:
DX:AX = current byte offset (only block device)
BL = bit 0..3:
device type (bit 3: 0=block/1=char device), bit 4..7: device index (0..15)
CX = number of bytes
DI = destination buffer

OUTPUT:
CY = error (CX > 0)
CX = remaining bytes (or CX = 0 if no error NC)

NOTES: Block device is limited to 4 GB.


DevWrite - device write

INPUT:
DX:AX = current byte offset (only block device)
BL = bit 0..3:
device type (bit 3: 0=block/1=char device), bit 4..7: device index (0..15)
CX = number of bytes
DI = source buffer

OUTPUT:
CY = error (CX > 0)
CX = remaining bytes (or CX = 0 if no error NC)

NOTES: Block device is limited to 4 GB.


Device type (0..7: block device, 8..15: character device):

FILEDEV_SYS: (=0) system disk (A:, B:, C:, ... P:)
FILEDEV_FD: (=1) floppy disk drive (FD1, FD2)
FILEDEV_HD: (=2) hard disk drive (HD1, ... HD4)
FILEDEV_RAM (=3) memory disk (RAM)
FILEDEV_RD (=4) RAM disk drive (RD1)
FILEDEV_NUL (=8) nul device
FILEDEV_CON (=9) con console
FILEDEV_COM (=10) com port (index 0=COM1/AUX, 1=COM2, ... 3=COM4)
FILEDEV_LPT (=11) lpt port (index 0=LPT1/PRN, 1=LPT2, 2=LPT3)

FILEDEV_MASKTYPE: (=0Fh) mask device type
FILEDEV_MASKINX: (=0F0h) mask device index
FILEDEV_SHIFT (=4) shift device index


Source code DEV.ASM

<< Back