home *** CD-ROM | disk | FTP | other *** search
- /*
- ┌────────────────────────────────────────────────────────────────────────────┐
- │jzcrtfil.c │
- │Create a file, given it's "handle". │
- │ │
- └────────────────────────────────────────────────────────────────────────────┘
- */
-
- #include <jaz.h>
-
- jzcrtfil(fname,fattr)
- char *fname;
- int fattr; /* attribute to create file with */
- {
- TREG wreg;
-
- wreg.x.ds = getds();
- wreg.x.dx = (int) fname;
- wreg.x.cx = fattr;
-
- wreg.h.ah = 0x3C; /* create file function */
-
- msdos(&wreg);
-
- if (wreg.x.flags & 1)
- return(-1);
- else
- return(wreg.x.ax);
-
- }