/* Constants used by both the driver and user programs with the DOS: * pseudo-device on the Ersatz-11 PDP-11 emulator. */ /* Command codes and return code values */ #define CC_E11 -1 /* execute E11 command */ #define CC_OPEN 0 /* open host file */ #define CC_CREAT 1 /* create host file */ #define CC_DEL 2 /* delete host file */ #define CC_READ 3 /* read host file */ #define CC_WRITE 4 /* write host file */ #define CC_SEEK 5 /* move file pointer */ #define CC_FIRST 6 /* find first matching file */ #define CC_NEXT 7 /* find next matching file */ #define CC_CLOSE 8 /* close host file */ #define RC_NXM -1 /* bus timeout */ #define RC_OK 0 /* success */ #define RC_NOT 2 /* file or dir does not exist */ #define RC_INVH 9 /* invalid handle */ #define RC_INSM 12 /* insufficient memory */ #define RC_PERM 13 /* permission denied */ #define RC_FEX 17 /* file exists */ #define RC_CROSS 18 /* cross-device link */ #define RC_INV 22 /* invalid command or argument */ #define RC_TOO 24 /* too many open files */ #define RC_NOSPC 28 /* no space left on device */ #define RC_RDEAD 36 /* resource deadlock would occur */ /* Open access/sharing mode code */ #define CM_AMSK 03 /* Mask for access code */ #define CM_SMSK 034 /* Mask for sharing code */ #define CM_RW 00 #define CM_RO 01 #define CM_WO 02 #define CM_COMPAT 000 /* compatible (??) */ #define CM_NONE 004 /* deny none */ #define CM_READ 010 /* deny read */ #define CM_WRITE 014 /* deny write */ #define CM_EXCL 020 /* exclusive */ #define CS_START 00 /* Seek from start of file */ #define CS_CURR 01 /* Seek from current location */ #define CS_END 02 /* Seek from current location */ /* Unix-specific stuff - stty() operation codes, etc */ #define DC_CREAT 1 /* Memorial Unix spelling! */ #define DC_FOPEN 2 #define DC_SEEK 3 #define DC_FCLOSE 4 #define DC_FINDFST 5 #define DC_FINDNXT 6 #define DC_DEL 7 #define DC_HOST 8