home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / ENTERPRS / CPM / UTILS / S / SMC21LIB.LZH / CLIB.DEF < prev    next >
Text File  |  2000-06-30  |  2KB  |  66 lines

  1.  
  2. /*
  3. ** CLIB.DEF -- Definitions for Small-C library functions
  4. **
  5. ** For other credits and references, see DDJ, May 1984
  6. */
  7.  
  8. /*
  9. ** Definition of CP/M FCB and additional parameters
  10. */
  11. #define FCBSIZE 36  /*size of file control block*/
  12. #define DRIVE 0 /*CP/M drive designator offset*/
  13. #define NAMEOFF 1 /*CP/M file name offset*/
  14. #define NAMEOFF2  16  /*CP/M 2nd file name offset*/
  15. #define NAMESIZE  8 /*CP/M file name size*/
  16. #define TYPEOFF 9 /*CP/M file type offset*/
  17. #define TYPESIZE  3 /*CP/M file type size*/
  18. #define NTSIZE  11  /*CP/M file name and type size*/
  19. #define RRNOFF 33  /*CP/M random record number offset*/
  20. #define CPMEOF  26  /*CP/M end-of-file byte*/
  21. #define BUFSIZE 128 /*size of I/O buffer*/
  22. #define MAXFILES  10  /*maximum open files*/
  23. /*
  24. ** CP/M function calls
  25. */
  26. #define CLOFIL  16  /*close file*/
  27. #define DCONIO  6 /*direct console i/o*/
  28. #define DELFIL  19  /*delete file*/
  29. #define FNDFIL  17  /*find first occurence of file*/
  30. #define FNDNXT  18  /*find next occurence of file*/
  31.  
  32. #define GETPOS  36  /*get number of current sector*/
  33. #define GOCPM 00  /*go to CP/M*/
  34. #define LSTOUT  05  /*list output*/
  35. #define MAKFIL  22  /*make file*/
  36. #define OPNFIL  15  /*open file*/
  37. #define POSEND  35  /*position file to end*/
  38. #define PUNOUT  04  /*punch output*/
  39. #define RENAME  23  /*rename file*/
  40. #define RDRND 33  /*read sector randomly*/
  41. #define RDRINP 03  /*reader input*/
  42. #define SETDMA  26  /*set dma*/
  43. #define WRTRND  40  /*write sector randomly*/
  44. /*
  45. ** Device codes
  46. */
  47. #define CPMCON DCONIO /*console*/
  48. #define CPMRDR RDRINP /*reader*/
  49. #define CPMPUN PUNOUT /*punch*/
  50. #define CPMLST LSTOUT /*list*/
  51. /*
  52. ** File status bits
  53. */
  54. #define RDBIT 1 /*open for read*/
  55. #define WRTBIT  2 /*open for write*/
  56. #define EOFBIT  4 /*eof condition*/
  57. #define ERRBIT  8 /*error condition*/
  58. /*
  59. ** ASCII characters
  60. */
  61. #define ABORT 3
  62. #define RUB 8
  63. #define PAUSE 19
  64. #define WIPE  24
  65. #define DEL 127
  66.