home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CBM Funet Archive
/
cbm-funet-archive-2003.iso
/
cpm
/
programming
/
HiTech_C
/
z80v309.lzh
/
CPM.H
< prev
next >
Wrap
Text File
|
1993-10-26
|
4KB
|
109 lines
/* HEADER FILE FOR cp/m I/O ROUTINES FOR z-80 c */
/* GET BASIC DEFINITIONS */
#IFNDEF_stddef
TYPEDEFINTPTRDIFF_T;/* RESULT TYPE OF POINTER DIFFERENCE */
TYPEDEFUNSIGNEDSIZE_T;/* TYPE YIELDED BY SIZEOF */
#DEFINE_stddef
#IFNDEFnull
#DEFINEnull((VOID *)0)
#ENDIFnull
EXTERN INTERRNO;/* SYSTEM ERROR NUMBER */
#ENDIF_stddef
/*HITECH.H HAS DEFINITIONS FOR UCHAR, USHORT ETC */
#INCLUDE<HITECH.H>
#IFZ80
#DEFINEmaxfile8/* MAX NUMBER OF FILES OPEN */
#ELSEZ80
#DEFINEmaxfile15/* MAX NUMBER OF FILES OPEN */
#ENDIFZ80
#DEFINEsecsize128/* NO. OF BYTES PER SECTOR */
EXTERN STRUCTFCB {$7b}
UCHARDR;/* DRIVE CODE */
CHARNAME[8];/* FILE NAME */
CHARFT[3];/* FILE TYPE */
UCHAREX;/* FILE EXTENT */
CHARFIL[2];/* NOT USED */
CHARRC;/* NUMBER OF RECORDS IN PRESENT EXTENT */
CHARDM[16];/* cp/m DISK MAP */
CHARNR;/* NEXT RECORD TO READ OR WRITE */
UCHARRANREC[3];/* RANDOM RECORD NUMBER (24 BIT NO. ) */
LONGRWP;/* READ/WRITE POINTER IN BYTES */
UCHARUSE;/* USE FLAG */
UCHARUID;/* USER ID BELONGING TO THIS FILE */
{$7d}_FCB[maxfile];
EXTERN CHARBDOS(INT, ...);
EXTERN STRUCT FCB *GETFCB(VOID);
EXTERN SHORTBDOSHL(INT, ...);/* BDOS CALL RETURNING VALUE IN HL */
EXTERN UCHARGETUID(VOID);
EXTERN VOIDSETUID(INT);
EXTERN UCHARSETFCB(STRUCT FCB *, CHAR *);
/* FLAG VALUES IN FCB.USE */
#DEFINEu_read1/* FILE OPEN FOR READING */
#DEFINEu_write2/* FILE OPEN FOR WRITING */
#DEFINEu_rdwr3/* OPEN FOR READ AND WRITE */
#DEFINEu_con4/* DEVICE IS CONSOLE */
#DEFINEu_rdr5/* DEVICE IS READER */
#DEFINEu_pun6/* DEVICE IS PUNCH */
#DEFINEu_lst7/* LIST DEVICE */
/* SPECIAL CHARACTER VALUES */
#DEFINEcpmetx032/* CTRL-z, cp/m END OF FILE FOR TEXT */
#DEFINEcpmrbt003/* CTRL-c, REBOOT cpm */
#DEFINEmpm0X100/* BIT TO TEST FOR mp/m */
#DEFINEccpm0X400/* BIT TO TEST FOR ccp/m */
#DEFINEismpm()(BDOSHL(cpmvers)&mpm)/* MACRO TO TEST FOR mpm */
/* WHAT TO DO AFTER YOU HIT RETURN */
#DEFINEexit(*(INT (*)())0)/* WHERE TO GO TO REBOOT cp/m */
/* BDOS CALLS ETC. */
#DEFINEcpmrcon1/* READ CONSOLE */
#DEFINEcpmwcon2/* WRITE CONSOLE */
#DEFINEcpmrrdr3/* READ READER */
#DEFINEcpmwpun4/* WRITE PUNCH */
#DEFINEcpmwlst5/* WRITE LIST */
#DEFINEcpmdcio6/* DIRECT CONSOLE i/o */
#DEFINEcpmgiob7/* GET i/o BYTE */
#DEFINEcpmsiob8/* SET i/o BYTE */
#DEFINEcpmrcob10/* READ CONSOLE BUFFERED */
#DEFINEcpmicon11/* INTERROGATE CONSOLE READY */
#DEFINEcpmvers12/* RETURN VERSION NUMBER */
/*bdos CALLS */
#DEFINEcpmrds13/* RESET DISK SYSTEM */
#DEFINEcpmlgin14/* LOG IN AND SELECT DISK */
#DEFINEcpmopn15/* OPEN FILE */
#DEFINEcpmcls16/* CLOSE FILE */
#DEFINEcpmffst17/* FIND FIRST */
#DEFINEcpmfnxt18/* FIND NEXT */
#DEFINEcpmdel19/* DELETE FILE */
#DEFINEcpmread20/* READ NEXT RECORD */
#DEFINEcpmwrit21/* WRITE NEXT RECORD */
#DEFINEcpmmake22/* CREATE FILE */
#DEFINEcpmren23/* RENAME FILE */
#DEFINEcpmilog24/* GET BIT MAP OF LOGGED IN DISKS */
#DEFINEcpmidrv25/* INTERROGATE DRIVE NUMBER */
#DEFINEcpmsdma26/* SET dma ADDRESS FOR I/O */
#DEFINEcpmsuid32/* SET/GET USER ID */
#DEFINEcpmrran33/* READ RANDOM RECORD */
#DEFINEcpmwran34/* WRITE RANDOM RECORD */
#DEFINEcpmcfs35/* COMPUTE FILE SIZE */
#DEFINEcpmdseg51/* SET dma SEGMENT */