home *** CD-ROM | disk | FTP | other *** search
/ FreeWare Collection 2 / FreeSoftwareCollection2pd199x-jp.img / ms_dos / fmgraph / g_bdrclr.c < prev    next >
Text File  |  1990-06-14  |  588b  |  33 lines

  1. #include    <stdio.h>
  2. #include    <dos.h>
  3.  
  4. struct BORDERCOLOR {
  5.     unsigned    type,color;
  6. };
  7.  
  8. extern    unsigned    char    gds_fshift;
  9. extern    unsigned    gds_wrkoff;
  10. extern    unsigned    gds_wrkseg;
  11.  
  12. int    g_bordercolor(unsigned color)
  13. {
  14.     union REGS    reg;
  15.     struct SREGS    seg;
  16.     struct {
  17.         unsigned    len;
  18.         struct BORDERCOLOR    bdr;
  19.     }    gdata;
  20.  
  21.     segread(&seg);
  22.     reg.h.ah=gds_fshift+0x0f;
  23.     reg.x.di=(unsigned)&gdata;
  24.     seg.ds=seg.ss;
  25.     gdata.len=4;
  26.     gdata.bdr.type=0x5382;
  27.     gdata.bdr.color=color;
  28.     reg.x.bx=gds_wrkoff;
  29.     seg.es=gds_wrkseg;
  30.     int86x(0x92,®,®,&seg);
  31.     return (int)reg.h.ah;
  32. }
  33.