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

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