home *** CD-ROM | disk | FTP | other *** search
- /************/
- /* DEMO1.C */
- /*********************************************/
-
- #include <ctype.h>
- #include <stdio.h>
- #include <dos.h>
-
- union REGS inregs;
- union REGS outregs;
-
- /****************/
- /* main program */
- /****************/
-
- int main(int argcnt, char *arglst[])
- {
- printf("\x01b[2J"); /* ANSI.SYS clear screen */
-
- printf("\x01b[5;5H*** MultiDos Plus DEMO1 Program ***");
- for (;;)
- {
- printf("\x01b[10;10H"); /* position cursor */
- inregs.h.ah = 0x2a; /* DOS GET DATE function code */
- int86(0x21, &inregs, &outregs);
- outregs.x.cx -= 1900;
- printf("%d/%d/%d", outregs.h.dh, outregs.h.dl, outregs.x.cx);
-
- inregs.h.ah = 0x2c; /* DOS GET TIME function code */
- int86(0x21, &inregs, &outregs);
- printf(" %d:%2.2d", outregs.h.ch, outregs.h.cl);
- printf(":%2.2d.%2.2d ", outregs.h.dh, outregs.h.dl);
-
- inregs.h.ah = 0; /* MultiDos Plus GIVE UP TIMESLICE */
- int86(0x15, &inregs, &outregs);
- }
- }
-