
imag

㭪            頥   ᭮ ᫠.

⠪          #include<complex.h>
                   double imag(complex x);

, ᮤঠ騩   complex.h
⨯

ᠭ           ᭮ ᫮  ⮨         ᥫ   
                   饩  窮.  imag  頥    ,
                    .

頥         ᭮ ᫠.
祭

७ᨬ       㭪樨    ॡ   ++      ⮬
                   ७ᨬ.

 ⠪       complex, conj, real.

ਬ:

#include<stream.h>
#include<complex.h>

int main(void)
{
   double x=3.1,y=4.2;
   complex z = complex(x,y);
   cout << "z = " << z << "\n";
   cout << "⢨⥫쭠  = " << real(z) << "\n";
   cout << "  = " << imag(z) << "\n";
   cout << "᭮ ᮯ殮 = " << conj(z) << "\n";
   return 0;
}


imagesise

㭪            頥 ⢮ , ॡ㥬  ࠭
                   ⮢ ࠧ.

⠪          #include <graphics.h>
                   unsigned far  imagesize(int left,  int top,
                    int right, int bottom);

, ᮤঠ騩   graphics.h
⨯

ᠭ           imagesize ।    ࠧ      ,
                   ॡ㥬    ࠭  ⮢  ࠧ.   ᫨
                   ࠧ, ॡ㥬  ࠭ ࠧ  
                   ࠢ 64-1 , imagesize 頥 0FFFF(-1).

頥       imagesize 頥 ࠧ ॡ㥬 
祭             .

७ᨬ      㭪 㭨쭠    Borland C++.   ࠡ⠥
                   ⮫쪮   IBM PC  ᮢ⨬  ,
                   ᭠饭 ᯫ묨 ࠬ, ন騬
                   ᪨  ०.  㭪      ᮢ⨬   
                   Windows.

 ⠪       getimage, putimage

ਬ:

#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>

#define ARROW_SIZE 10

void draw_arrow(int x,int y);

int main(void)
{
int graphdriver = DETECT, gmode, errorcode;
void *arrow;
int x,y,maxx;
unsigned int size;

/* 樠 ࠩ   ६ */
initgraph(&graphdriver,&gmode,"");

/* 祭 १ 樠樨 */
errorcode = graphresult();
if(errorcode != grOk)  /* ᫨ 訡 */
{
   printf("訡 :%s\n",grapherrormessage(errorcode));
   printf(" ⠭   \n");
   getch();
   exit(1);  /* 襭   訡 */
}
maxx = getmaxx();
x = 0;
y = getmaxy()/2;
/* ᮢ ६頥 ꥪ */
draw_arrow(x,y);
/* । ࠧ ,  ࠭ ࠦ */
size = imagesize(x,y-ARROW_SIZE,x+(4*ARROW_SIZE),y+ARROW_SIZE);
/* 뤥  */
arrow = malloc(size);
/*  ࠦ */
getimage(x,y-ARROW_SIZE,x+(4*ARROW_SIZE),y+ARROW_SIZE,arrow);
/* த,   㤥   */
while(!kbhit())
{
   /*   ࠧ */
   putimage(x,y-ARROW_SIZE,arrow,XOR_PUT);
   x += ARROW_SIZE;
   if(x >= maxx)
      x = 0;
   /* ᮢ ࠦ */
   putimage(x,y-ARROW_SIZE,arrow,XOR_PUT);
}

free(arrow);
closegraph();
return 0;
}

void draw_arrow(int x,int y)
{
   /* ᮢ  ࠭ ५ */
   moveto(x,y);
   linerel(4*ARROW_SIZE,0);
   linerel(-2*ARROW_SIZE,-1*ARROW_SIZE);
   linerel(0,2*ARROW_SIZE);
   linerel(2*ARROW_SIZE,-1*ARROW_SIZE);
}


initgraph

㭪            樠  ⥬.

⠪          #include <graphics.h>
                   void far  initgraph(int  far  *graphdriver,
                    int far *graphmode, char far *pathtodriver)

, ᮤঠ騩   graphics.h
⨯

ᠭ           initgraph 樠  ⥬ ⥬
                   㧪  ᪮  ࠩ     ᪠   (
                   ⢥ত                    ࠡᯮᮡ
                   ॣ஢ ࠩ)  ॢ  ⥬
                     ᪨  ०.

                    ⮣   ⮡      ⥬,
                   ० ᥣ 맮 㭪 initgraph. initgraph
                   㦠  ᪨ ࠩ  ॢ ⥬
                    ᪨ ०.   㪠 ᪮
                   ⥬    ᯮ짮      ᪨
                   ࠩ  ०,  , ⮡  ᠬ । 
                      ࠡ  ਢ易      ⥬
                     ⫠  ᮮ⢥騩  ࠩ.

                   ᫨   㪠  initgraph  ⮮।   
                   뢠   detectgraph     롮  ᪮
                   ࠩ          ०.     initgraph     ⠪
                   ⠭    ᪨ ࠬ  
                   祭  㬮砭 (⥪  ,  ,
                   梥,   ࠭,   .  .)  ⠭
                   grapgresult    0.

                   筮 initgraph  㦠  ᪨   ࠩ
                   ⥬  뤥      ࠩ ( 
                   㭪樨     _graphgetmem),     ⥬     㦠
                   ᮮ⢥騩    䠩    .BGI        ᪠.   
                   ⨢ ⮩     奬      ᪮
                   㧪,   ᮥ 䠩 ᪮
                   ࠩ    (    ᪮쪮    ⠪     䠩)
                   ।⢥    믮塞  䠩.  
                    ஡  ଠ     䠩   UTIL.DOC,
                    ⠢   ⥬.

                   pathodriver ।e           ஬
                   initgraph  㤥  ᪠   ᪨   ࠩ.
                   initgraph ᭠砫   ,  ।塞
                    pathtodriver,  ⥬ ( ᫨  ⠬ )    
                   ⥪饬 ⠫. ⥫쭮, ᫨ pathtodriver
                   ࠢ NULL,  䠩 ࠩ (*.BGI)    
                   ⥪饬 ⠫.   ⥬ settexstyle 㤥
                   ᪠ 䠩 (.CHR), ᮤঠ騥 .

                   *graphdriver -    楫,    ஥     ।
                   ᯮ㥬 ᪨ ࠩ.   
                    祭,  ᯮ ⠭ graphics_driver
                   塞 ⨯,  ।  graphics.h 
                     ⠡ 2.3.

                    2.3. ⠭ ᪨ ࠩ஢.
                   _____________________________________________
                   graphics_drivers
                   ⠭           ᫥ 祭
                   _____________________________________________

                   DETECT              0 (訢
                                          ⮮।-
                                           ࠩ)
                   CGA                 1
                   MCGA                2
                   EGA                 3
                   EGA64               4
                   EGAMONO             5
                   IBM8514             6
                   HERCMONO            7
                   ATT400              8
                   VGA                 9
                   PC3270              10
                   _____________________________________________

                   *graphmode - 楫,  ஥  ।  室
                   ᪨  ०  (᫨  *graphdriver    ࠢ
                   DETECT,  *graphmode  ⠭    襥
                   ࠧ襭,  ⨬   ࠩ).  
                       祭   *graphmode,   ᯮ
                   ⠭   塞   ⨯  graphics_modes,
                   ।  graphics.h  ਢ   ⠡
                   2.5.
                       
                   砭: 祭 graphdriver  graphmode 
                    ⠭  祭  ⠡ 2.5    2.3,
                          ।᪠㥬   १.
                   ᪫祭 ⠢        砩,     
                   graphdriver = DETECT.

                    ⠡ 2.5,   ⮫ "" C0, C1,
                   C2  C3 ⭮    ६  ࠭  ।
                   梥 ࠬ,  ⢨⥫  CGA 
                   ᮢ⨬ ⥬.      梥  䮭
                   ( #0),   ⠫ 梥  . 
                    ஡ ᠭ   8 "-㭪樨"
                    "㪮⢥     ணࠬ"     (    ࠧ
                   "ࠢ 梥⮬"),   ⪮ ᠭ  ⠡
                   2.4.
                      
     2.4.  梥⮢.
    
             ⠭ ᢮ 祭 ᥫ
              1               2               3
    
         0     CGA_LIGHTGREEN   CGA_LIGHTRED       CGA_YELLOW
         1     CGA_LIGHTCYAN    CGA_LIGHTMAGENTA   CGA_WHITE
         2     CGA_GREEN        CGA_RED            CGA_BROWN
         3     CGA_CYAN         CGA_MAGENTA        CGA_LIGHTGRAY
    
                                
                   ᫥ 饭        initgraph     *graphdriver
                   ⠭   ⥪騩 ᪨ ࠩ,  
                   *graphmode  ⥪騩 ᪨ ०.
                   
 2.5. ᪨ ०.

.  graphics   .         ࠭
ࠩ     _modes            * ⮫殢

CGA         CGAC0       0     320 x 200   C0          1
            CGAC1       1     320 x 200   C1          1
            CGAC2       2     320 x 200   C2          1
            CGAC3       3     320 x 200   C3          1
            CGAHI       4     640 x 200   2梥      1

MCGA        MCGAC0      0     320 x 200   C0          1
            MCGAC1      1     320 x 200   C1          1
            MCGAC2      2     320 x 200   C2          1
            MCGAC3      3     320 x 200   C3          1
            MCGAMED     4     640 x 200   2梥      1
            MCGAHI      5     640 x 480   2梥      1

EGA         EGALO       0     640 x 200   16梥⮢    4
            EGAHI       1     640 x 350   16梥⮢    2

EGA64       EGA64LO     0     640 x 200   16梥⮢    1
            EGA64HI     1     640 x 350   4 梥     1

EGA-        EGAMONOHI   3     640 x 350   2 梥     1*
MONO        EGAMONOHI   3     640 x 350   2 梥     2**

HERC        HERCMONOHI  0     720 x 348   2 梥     2

AT400       ATT400C0    0     320 x 200   C0          1
            ATT400C1    1     320 x 200   C1          1
            ATT400C2    2     320 x 200   C2          1
            ATT400C3    3     320 x 200   C3          1
            ATT400MED   4     640 x 200   2 梥     1
            ATT400HI    5     640 x 400   2 梥     1

VGA         VGALO       0     640 x 200   16梥⮢    2
            VGAMED      1     640 x 350   16梥⮢    2
            VGAHI       2     640 x 380   16梥⮢    1

PC3270      PC3270HI    0     720 x 350   2 梥     1

IBM8514     IBM8514HI   0     640 x 480   256梥⮢
            IBM8514LO   0    1024 x 768   256梥⮢

 *  64   EGAMONO
**  256   EGAMONO


頥       initgraph ᥣ  ⠭   ७   
祭           訡.  砥 ᯥ譮 믮  ࠢ 0.
                    砥  訡 *graphdriver ⠭  
                   -2,  -3,  -4    -5,    graphresult  頥
                   ᮮ⢥騥 祭, ᫥ :

                    -2 -    । ⨯ ᪮
                           (grNotDetected).
                   
                    -3 -     䠩 ࠩ
                          (grFileNotFound).
                   
                    -4 -  ࠢ ࠩ (grInvalidDriver).
                   
                    -5 -  筮   㧪
                          ࠩ (grNoLoadMem).

७ᨬ      㭪 㭨쭠    Borland C++.   ࠡ⠥
                   ⮫쪮   IBM PC  ᮢ⨬  ,
                   ᭠饭 ᯫ묨 ࠬ, ন騬
                   ᪨   ०.   㭪     ᮢ⨬  
                   Windows.

 ⠪       losegraph, detectgraph,        getdefaultpalette,
                   getdrivername,     getgraphmode,     getmoderange,
                   graphdefault,      _graphgetmem,      graphresult,
                   installuserdriver,              registerbgidriver,
                   registerbgifont,  restorecrtmode, setgraphbufsize,
                   setgraphmode

ਬ:

#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>

int main(void)
{
/* ॡ ⮮। */
int graphdriver = DETECT, gmode, errorcode;

/* 欠 ᪮ ० */
initgraph(&graphdriver,&gmode,"");

/* 祭 १ 樠樨 */
errorcode = graphresult();
if(errorcode != grOk)  /* ᫨ 訡 */
{
   printf("訡 :%s\n",grapherrormessage(errorcode));
   printf(" ⠭   \n");
   getch();
   exit(1);  /* 襭   訡 */
}
line(0,0,getmaxx(),getmaxy());

getch();
closegraph();
return 0;
}


inport

㭪            뢠 ᫮  .

⠪          #include <dos.h>
                   int inport(int portid);

, ᮤঠ騩   dos.h
⨯

ᠭ           inport ࠡ⠥  筮    
                   80x86  IN.    뢠  訩   ᫮ 
                   室 ,    ࠬ஬  portid,  
                   訩    portid+2.

頥       㭪樨 inport  ⠭ 祭.
祭

७ᨬ      㭪 㭨쭠  ய஢ ᥬ⢠
                   8086.

 ⠪       inportb, outport, outportb.

ਬ:

#include<stdio.h>
#include<dos.h>

int main(void)
{
   int result;
   int port = 0; /* ᫥⥫  0 */
   result = inport(port);
   printf(", ⠭   %d = 0x%X\n",port,result);
   return 0;
}


inportb

㭪            뢠   .

⠪          #include <dos.h>
                   int inport(int port);

, ᮤঠ騩   dos.h
⨯

ᠭ           inportb -  ப,  뢠 
                    ,  ।塞 ࠬ஬ port.  ᫨ 
                   稫 䠩 dos.h,   inportb ᬠਢ
                       ப,          
                   ஥ .  ᫨    dos.h,  
                   ⬥   ।   ப     
                   樨 #undef,   㭪.

頥       inportb 頥 ⠭ 祭.
祭

७ᨬ      㭪 㭨쭠  ய஢ ᥬ⢠
                   8086.

 ⠪       inport, outport, outportb.

ਬ:

#include<stdio.h>
#include<dos.h>

int main(void)
{
   unsigned char result;
   int port = 0; /* ᫥⥫  0 */
   result = inportb(port);
   printf(", ⠭   %d = 0x%X\n",port,result);
   return 0;
}


insline

㭪            ⠢  ப  ⥪⮢ .

⠪          #include<conio.h>
                   void insline(void);

, ᮤঠ騩   conio.h
⨯

ᠭ           insline ⠢   ⥪饬 ⥪⮢  
                   ப,    ⥪饩  樥     
                   梥⮬   䮭.    ப  騥    
                   ப稢 .   ப 祧.

                   insline ᯮ  ⥪⮢ ०.

頥       .
祭

७ᨬ      insline ࠡ⠥ ⮫쪮   ᮢ⨬
                    IBM PC,  ᮮ⢥ 㭪      Turbo
                   Pascal. 㭪  ᮢ⨬  Windows.

 ⠪       clreol, delline, window

ਬ:

#include<conio.h>

int main(void)
{
   clrscr();
   cprintf("㭪 INSLINE ⠢ ப,  ⥪饬 -\r\n");
   cprintf(" , ᯮ ⥪騩 梥 䮭.\r\n");
   cprintf(" ப  , ᤢ . \r\n");
   cprintf("INSLINE ࠡ⠥  ⥪饬 ⨢ \r\n");
   cprintf("⥪⮢ .  த  ...");
   gotoxy(1,3);
   getch();
   insline();
   getch();
   return 0;
}


installuserdriver

㭪             ⥫   ࠩ   ன  
                   ⠡ ࠩ஢ ன BGI.

⠪          #include <graphics.h>
                   int far installuserdriver(char far *name,
                                     int huge(*detect)(void));

, ᮤঠ騩   graphics.h
⨯

ᠭ           installuserdriver            
                   ⥫ ࠩ  ஥ BGI ⠡.
                   ࠬ  name  -      (.BGI)  䠩  
                   ࠩ,    ࠬ  detect  -   㪠⥫   
                   ⥫  㭪  ⮮।,  
                    ᮯ஢  ࠩ.   㭪  
                         ࠬ஢    頥  楫
                   祭.

                      ᯮᮡ  ᯮ짮  ࠩ஢,
                   ⠢塞 த栬.  ।     
                    ,   뢠   Spiffy  Graphic
                   Array (SGA)  ந⥫ ⮩ SGA  ᯥ稢
                     ⠪ BGI-ࠩ஬ (SGA.BGI).  ⥩訩
                   ᯮᮡ ᯮ짮 ࠩ ⮨  
                      installuserdriver,   ⥬ ।
                   頥    祭    (᢮    
                   ࠩ) ।⢥  initgraph.

                   㣮,   騩  ᯮᮡ  ᯮ짮  ⮣
                   ࠩ ⮨    ࠨ      㭪
                   ⮮।,   뢠 initgraph 
                     ࠩம।饩    (⭮,
                   ந⥫    SGA              㭪
                   ⮤⥪஢).     ࠩ  
                    installuserdriver,     ।  
                   ⮩  㭪樨        䠩   ࠩ
                   ன⢠.

                   ᫥ ⮣        䠩 ࠩ 
                   SGA-㭪   ⮤⥪஢,      뢠
                   initgraph       믮 ଠ
                      ⮤⥪஢.   ।   ⥬    
                   initgraph      맮      ஥     㭪
                   ⮤⥪஢(detectgraph),         맮
                   SGA-㭪     ⮤⥪஢.    ᫨    
                   SGA-㭪  室    ।⢠  SGA,
                    頥 祭 -11 (grError),  initgraph
                   த ଠ   ⮤⥪஢,
                        맮 㣨 ⠢
                   ந⥫ 㭪権  ⮤⥪஢    ⮬
                   浪        뫨 ).  ᫨ ,
                   ,  㭪 ।,   SGA ,
                    頥 ⥫  ०; ⥬
                   initgraph 室  㦠  SGA.BGI,  ॢ
                       ।⢠       ᪨   ०,
                   ४㥬  㭪樥   ⮤⥪஢,   ,
                   , । ࠢ 襩 ணࠬ.

                   ६            
                   ࠩ஢.

頥       祭 頥   installuserdriver   -  
祭            ࠩ,    ।  initgraph
                    ⮣,  ⮡    
                   ࠩ.

७ᨬ      㭪 㭨쭠   Borland  C++.    㭪
                   ਣ   ⮫쪮      ஢   IBM  PC  
                   ᮢ⨬     ,    ᭠饭   ᯫ묨
                   ࠬ,  ন騬  ᪨   ०.
                   㭪  ᮢ⨬  Windows.

 ⠪       initgraph, registerbgidriver

ਬ:

#include<graphics.h>
#include<stdlib.h>
#include<stdio.h>
#include<conio.h>

/* ⨯ 㭪権 */
int huge detectEGA(void);
void checkerrors(void);

int main(void)
{
   int gdriver,gmode;
   /* ⠫஢ ࠩ, ᠭ 짮⥫ */
   gdriver = installuserdriver("EGA",detectEGA);
   /* 樨஢ ⮮। */
   gdriver = DETECT;
   /* ஢  訡 ⠫樨 */
   checkerrors();
   /* 樠 䨪   ६ */
   initgraph(&gdriver,&gmode,"");
   /* ஢  訡 樠樨 */
   checkerrors();
   /* ᮢ  */
   line(0,0,getmaxx(),getmaxy());
   /* ⪠ */
   getch();
   closegraph();
   return 0;
}
/* ।  EGA  VGA */
int huge detectEGA(void)
{
   int driver, mode, sugmode = 0;
   detectgraph(&driver,&mode);
   if((driver == EGA) || (driver == VGA))
       /*  ।  ० */
       return sugmode;
   else
      /*   訡 */
      return grError;
}
/* ஢ઠ  ᮮ饭   訡 */
void checkerrors(void)
{
   int errorcode;
   errorcode = graphresult();
   if(errorcode != grOk)
   {
      printf("訡 䨪 %s\n",grapherrormsg(errorcode));
      printf(" 襭   ... ");
      getch();
      exit(1);
   }
}


installuserfont

㭪            㦠 䠩    ⮬  (.CHR),     
                   ஥  BGI-⥬.

⠪          #include <graphics.h>
                   int far installuserfont(char far *name);

, ᮤঠ騩   graphics.h
⨯

ᠭ           name -     ⮢ 䠩,  ᮤঠ饣
                    .    ६        
                      ⮢.

頥       installuserfont 頥     ID-    ,
祭            ⥬   ।    settextstyle
                       롮    ᮮ⢥饣   .   ᫨
                   ७   ⠡   ⮢    ,    
                   頥 祭 ࠢ -11 (grError).

७ᨬ      㭪 㭨쭠    Borland  C++.   㭪
                   ਣ  ⮫쪮     ஢   IBM   PC   
                   ᮢ⨬      ,   ᭠饭   ᯫ묨
                   ࠬ, ন騬   ᪨   ०.
                   㭪  ᮢ⨬  Windows.

 ⠪       settextstyle

ਬ:

#include<graphics.h>
#include<stdlib.h>
#include<stdio.h>
#include<conio.h>

/* ⨯ 㭪権 */
void checkerrors(void);

int main(void)
{
   int gdriver = DETECT,gmode;
   int userfont;
   int midx,midy;

   /* 樠 䨪   ६ */
   initgraph(&gdriver,&gmode,"");
   midx = getmaxx()/2;
   midy = getmaxy()/2;
   /* ஢  訡 樠樨 */
   checkerrors();
   /* ⠫஢ , ᠭ 짮⥫ */
   userfont = installuserfont("USER.CHR");
   /* ஢  訡 ⠫樨 */
   checkerrors();
   /*  짮⥫᪨  */
   settextstyle(userfont,HORIS_DIR,4);
   /* 뢥  ⥪ */
   outtextxy(midx,midy,"");
   /* ⪠ */
   getch();
   closegraph();
   return 0;
}
/* ஢ઠ  ᮮ饭   訡 */
void checkerrors(void)
{
   int errorcode;
   errorcode = graphresult();
   if(errorcode != grOk)
   {
      printf("訡 䨪 %s\n",grapherrormsg(errorcode));
      printf(" 襭   ... ");
      getch();
      exit(1);
   }
}


int86

㭪             ணࠬ 뢠  8086.

⠪          #include <dos.h>
                   int int86(int intr_num, union REGS *inregs,
                             union REGS *outregs);

, ᮤঠ騩   dos.h
⨯

ᠭ           㭪      ணࠬ      뢠
                   ய   8086,  祬    뢠
                   ।    㬥⮬     intr_num.     ।
                   믮 뢠,  㭪  祭
                   ॣ஢  ꥤ inregs  ᠬ ॣ.

                   ᫥     뢠,  㭪  
                   ⥪騥 祭 ॣ஢  ࠬ  outregs,  
                   ﭨ 䫠 ⥬ ७   x.cflag
                   ࠬ outregs,   ᮤন ॣ 䫠 
                    x.flags.  ᫨ 䫠 ७ ⠭,  
                   筮 砥  ந諠 訡.

                   ਬ砭: ࠬ  inregs     outregs   
                   㪠뢠    㦥 .

頥       㭪 int86 頥 祭 ॣ AX ᫥
祭           襭 뢠. ᫨ 䫠 ७
                   ⠭ (outregs-->x.cflag!=0),          
                   ந諠  訡,     㭪   ᢠ
                   쭮 ६ _doserrno  訡.

७ᨬ      㭪 㭨쭠 ᥬ⢠ ய஢ 8086.

ਬ:

#include <dos.h>
#include<conio.h>
#include<stdio.h>

#define VIDEO 0x10

void movetoxy(int x, int y)
{
   union REGS regs;
   regs.h.ah = 2; /* ⠭   */
   regs.h.dh = y;
   regs.h.dl = x;
   regs.h.bh = 0;  /* ࠭ 0 */
   int86(VIDEO, &regs, &regs);
}

int main(void)
{
   clrscr();
   movetoxy(35,10);
   printf("ਢ\n");
   return 0;
}


int86x

㭪            䥩  ணࠬ묨 뢠ﬨ 
                   8086.

⠪          #include <dos.h>
                   int int86(int intr_num, union REGS *inregs,
                       union REGS *outregs, struct SREGS *segregs);

, ᮤঠ騩   dos.h
⨯

ᠭ           㭪       ணࠬ     뢠
                   ய  8086,  祬     뢠
                   ।     㬥⮬     intr_num.    ।
                   믮 뢠,  㭪  祭
                   ॣ஢  ꥤ inregs  ᠬ ॣ.

                   ஬ ⮣, int86  祭 segregs->x.ds
                    segregs->x.es  ᮮ⢥騥 ॣ,  ।
                   맮  뢠.       
                   ணࠬ   ᯮ짮  쭨  㪠⥫  
                   訥      㪠  ᯮ㥬
                    뢠 ᥣ⮢.

                   ᫥     뢠,  㭪  
                   ⥪騥 祭 ॣ஢  ࠬ  outregs,  
                   ﭨ 䫠 ⥬ ७   x.cflag
                   ࠬ outregs.  ᫨ 䫠 ७ ⠭,
                     砥   ந諠 訡.  ஬ ⮣,
                    㭪  ⠭  ᮤন  DS  
                           segregs->es      segregs->ds
                   ᮮ⢥騬 祭ﬨ.

                   int86x       ஢   뢠
                   ஥  砥 祭  DS ⫨筮  
                   ᥣ      㬮砭,   /   ஥
                   砥 㬥  ॣ ES.

                   ਬ砭: ࠬ   inregs     outregs  
                   㪠뢠    㦥 .

頥       㭪 int86 頥 祭 ॣ AX ᫥
祭           襭 뢠. ᫨ 䫠 ७
                   ⠭ (outregs-->x.cflag!=0),          
                   ந諠   訡,     㭪  ᢠ
                   쭮 ६ _doserrno  訡.

७ᨬ      㭪 㭨쭠  ᥬ⢠ ய஢
                   8086.

 ⠪       bdos, bdosptr, geninterrupt, intdos, intdosx,
                   int86, intr, segread.

ਬ:

#include<dos.h>
#include<process.h>
#include<stdio.h>

int main(void)
{
   char filename[80];
   union REGS inregs,outregs;
   struct SREGS segregs;
   printf("  䠩:");
   gets(filename);
   inregs.h.ah = 0x43;
   inregs.h.al = 0x21;
   inregs.x.dx = FP_OFF(filename);
   segregs.ds = FP_SEG(filename);
   int86x(0x21,&inregs,&outregs,&segregs);
   printf("ਡ 䠩: %X\n",outregs.x.cx);
   return 0;
}


intdos

㭪            䥩  㭪ﬨ DOS.

⠪          #include <dos.h>
                   int intdos(union REGS *inregs,
                               union REGS *outregs);

, ᮤঠ騩   dos.h
⨯

ᠭ           㭪  뢠 DOS 0x21  ᪠
                      㭪樨   DOS.    祭    ࠬ
                   inregs->h.al । 㭪 DOS.

                   ᫥     뢠,  㭪  
                   ⥪騥  祭 ॣ஢  ࠬ outregs,  
                   ﭨ 䫠 ⥬ ७   x.cflag
                   ࠬ outregs.  ᫨ 䫠 ७ ⠭,
                    砥  ந諠 訡.

                   ਬ砭: ࠬ  inregs     outregs   
                   㪠뢠    㦥 .


頥       ᫥ 襭 맮 ணࠬ DOS, 㭪
祭           intdos 頥 祭 ॣ AX. ᫨
                   䫠 ७   ⠭    (outregs-->x.cflag
                   !=0),    砥 訡,  ६ _doserrno
                   砥  ⢥ 祭  訡.

७ᨬ      㭪 㭨쭠  DOS.

 ⠪     bdos, bdosptr, geninterrupt, int86, int86x,
                   intdosx, intr

ਬ:
      #include <stdio.h>
      #include <dos.h>
      /* 㤠 䠩.  ᯥ譮 襭 頥 0, 
         㫥 祭 */
      int delete_file(char near *filename)
      {
         union REGS regs;
         int ret;
         regs.h.ah = 0x41; /* 㤠 䠩  */
         regs.x.dx = (unsigned) filename;
         ret = intdos(&regs, &regs);
         /* if carry flag is set, there was an error */
         return(regs.x.cflag ? ret : 0);
      }
      int main(void)
      {
         int err;
         err = delete_file("NOTEXIST.$$$");
         printf("Able to delete NOTEXIST.$$$: %s\n",
                 (!err) ? "YES" : "NO");

     }


intdosx

㭪            䥩  㭪ﬨ DOS.

⠪          #include <dos.h>
                   int int86(int intr_num, union REGS *inregs,
                       union REGS *outregs, struct SREGS *segregs);

, ᮤঠ騩   dos.h
⨯

ᠭ           㭪  ணࠬ 뢠 DOS 0x21
                      맮  室  㭪樨  DOS.  祭
                   inregs->h.al । ॡ㥬 㭪.

                   ஬ ⮣,     intdosx          祭
                   segregs->x.ds   segregs->x.es    ᮮ⢥騥
                   ॣ,    ।    맮    뢠.   
                        ணࠬ   ᯮ짮
                   쭨  㪠⥫    訥   
                   㪠 ᯮ㥬  뢠 ᥣ⮢.

                   ᫥     뢠,  㭪  
                   ⥪騥  祭 ॣ஢  ࠬ outregs,  
                    䫠 ⥬ ७      x.cflag
                   ࠬ outregs.  ᫨ 䫠 ७ ⠭,
                    砥  ந諠  訡.  ஬  ⮣,
                     㭪  ⠭  ᮤন  DS 
                         segregs->es        segregs->ds
                   ᮮ⢥騬 祭ﬨ.

                   intdosx       뢠   㭪  DOS,
                    砥 祭  DS, ⫨筮  
                   ᥣ        㬮砭,  /  ஥
                   砥 㬥  ॣ ES.

                   ਬ砭: ࠬ  inregs     outregs   
                   㪠뢠    㦥 .

頥       㭪 intodsx 頥 祭 ॣ AX ᫥
祭           襭 뢠. ᫨ 䫠 ७
                   ⠭ (outregs-->x.cflag!=0),          
                   ந諠  訡,     㭪   ᢠ
                   쭮 ६ _doserrno  訡.

७ᨬ      㭪 㭨쭠  DOS.

 ⠪       bdos, bdosptr, geninterrupt, intdos, int86x,
                   int86, intr, segread.

ਬ:
      #include <stdio.h>
      #include <dos.h>
      /* 㤠 䠩.  ᯥ譮 襭 頥 0, 
         㫥 祭 */
      int delete_file(char near *filename)
      {
         union REGS regs;
         int ret;
         regs.h.ah = 0x41; /* 㤠 䠩  */
         regs.x.dx = (unsigned) filename;
         ret = intdos(&regs, &regs);
         /* if carry flag is set, there was an error */
         return(regs.x.cflag ? ret : 0);
      }
      int main(void)
      {
         int err;
         err = delete_file("NOTEXIST.$$$");
         printf("Able to delete NOTEXIST.$$$: %s\n",
                 (!err) ? "YES" : "NO");

     }
뢮:

      Able to delete NOTEXIST.$$$: NO



intr

㭪            ⥫ 䥩  뢠  
                   8086.

⠪          #include <dos.h>
                   void intr(int intr_num, struct REGPACK *preg);

, ᮤঠ騩   dos.h
⨯

ᠭ           㭪 intr ন ୠ⨢ 䥩
                      믮   ணࠬ   뢠.   
                       뢠   ய   8086,
                    㬥⮬ intr num.

                   㭪 intr । 믮 뢠 
                   祭  ॣ஢      REGPACK  *preg
                   ।⢥      ॣ.  ᫥  襭
                   뢠 㭪 intr  ⥪饥  祭
                   ॣ஢    ࠬ   preg.   祭   䫠
                    ࢨ஢묨.

                   㭪樨 intr । ᫥騥 ࠬ:

                   intr num -  믮塞 뢠;

                   preg -  , ᮤঠ騩:

                      (a)- 祭 ॣ஢ । 맮;
                      (b)- 祭 ॣ஢ ᫥ 맮
                           뢠.

                    REGPACK      dos.h  ᫥騬
                   ࠧ:

                   struct REGPACK
                      {
                      unsigned r_ax, r_bx, r_cx, r_dx;
                      unsigned r_bp, r_si, r_di, r_ds, r_es, r_flags;
                      };

頥        祭  頥. 
祭           REGPACK *streg ᮤন 祭 ॣ஢ ᫥
                   맮 뢠.

७ᨬ      㭪 㭨쭠 ᥬ⢠ ய஢ 8086.

 ⠪     geninterrupt, int86, int86x, intdos, intdosx.

ਬ:

#include<stdio.h>
#include<string.h>
#include<dir.h>
#include<dos.h>

#define CF 1  /* 䫠 ७ */

int main(void)
{
   char directory[80];
   struct REGPACK reg;
   printf(" ४, 㤠 ३:");
   gets(directory);
   reg.r_ax = 0x3b << 8;
   reg.r_dx = FP_OFF(directory);
   reg.r_ds = FP_SEG(directory);
   intr(0x21,&reg);
   if(reg.r_flags & CF)
      printf("訡  ᬥ ४ਨ\n");
   getcwd(directory);
   printf(" ४: %s",directory);
   return 0;
}


ioctl

㭪            ࠢ ன⢠ /뢮.

⠪          int ioctl(int handle, int func[, int *argdx,
                   int argcx]);

, ᮤঠ騩   io.h
⨯

ᠭ            㭪 ।⠢ ᮡ ।⢥
                   䥩  맮 㭪樨 DOS 0x44 (IOCTL).

                   믮塞 㭪    祭 ࠬ
                   func ᫥騬 ࠧ:

                   0 - 祭 ଠ樨  ன⢥.

                   1 - ⠭ ଠ樨  ன⢥ ( ࠬ
                       argdx).

                   2 - 뢠 argcx   頥   ,
                       㪠  argdx.

                   3 - 뢠 argcx    ,    
                       㪠뢠 argdx.

                   4 - ,     樨 2,  ᪫ ,  
                       ࠬ handle ࠪ,   ᪮
                       (0=  㬮砭, 1=A,  ..).

                   5 - ,       樨 3,   ᪫祭
                       ⮣,   ࠬ  handle  ࠪ,   
                        ᪮(0=  㬮砭, 1=A,  ..);

                   6 - 砥  .

                   7 - 砥  뢮.

                   8 -   ᬥ; ⮫쪮  ᨩ DOS 3.0;

                   11 - ⠭  ᫮  ஢  䫨
                        ࠧ 䠩; ⮫쪮  ᨩ DOS 3.0.

                   㭪 ioctl         ᯮ짮    
                   祭 ଠ樨     ன.  
                   ᯮ짮 ⠪   䠩,      
                    ᯮ짮  ⮫쪮  func ࠢ 0,  6  7.
                    ⠫ 맮      䠩
                   訡筮 祭 EINVAL.

                      ⠫ ଠ  㬥
                      頥   祭        "ࠢ筮
                   㪮⢥   ணࠬ   DOS"   -    ᠭ
                   ⥬ 맮 0x44.

                   㬥 argdx  argcx - 易⥫.

                   㭪 ioctl  ᯥ稢  אַ  䥩   
                   ᯥ樠  㭪  ࠩ஢ ன DOS.  
                   १, 筮   㭪樨  㤥
                         ᨬ      ⠢騪  -
                   ந⥫  .   ᯥ祭      ࠧ
                   ன.  ஬ ⮣,    ᫥
                   ࠢ  䥩,  ᠭ  .   
                   ⭮    ᠭ    ⥬    BIOS   襣
                   ⭮ ⠢騪, ⮡   ࠢ
                   ᯮ짮 㭪樨 ioctl.

頥        祭 ࠬ func - 0  1 頥
祭           祭 ।⠢ ᮡ ଠ  ன-
                   ⢥ ( ᭮ 祭 ॣ DX,  砥
                    맮 IOCTL).

                    祭 func  2  5, 頥 祭
                   -  ⢮ ॠ쭮 । .

                    祭 func 6  7,  頥 祭
                   -   ன⢠.

                       樨,   ᫨   㦥    訡,
                   頥  -1    쭠  ६  errno
                   砥   ᫥騩 祭:

                   EINVAL -   㬥.
                   EBADF  -    䠩.
                   EINVDAT -  .

७ᨬ      㭪 ioctl ন  ⥬ UNIX,  
                     ᠭ묨  ࠬࠬ.   ⥬ UNIX
                   ᨨ  7   ⥬ SYSTEM III ਬ 㭪樨
                   ioctl ࠧ筮. 맮 㭪樨 ioctl  ७ᨬ
                    ⥬ UNIX  祭 । ७  
                   ⥬ DOS  .

                      MS-DOS 3.0 ࠬ func ࠧ७ 
                   祭ﬨ: 8  11.

ਬ:

#include <stdio.h>
#include <io.h>
#include <dir.h>

int main(void)
{
   int stat;
   /* 㭪 8 ᯮ, ⮡ ।,  
      ,  ⥪饬 ன⢥ ᬥ */
         stat = ioctl(0, 8, 0, 0);
         printf(" %c %s ᬥ\n", getdisk() + 'A',
                 (stat == 0) ? "" : "");
      }



isalnum

㭪             䨪樨 ᨬ.

⠪          #include <ctype.h>
                   int isalnum(int c);

, ᮤঠ騩   ctype.h
⨯

ᠭ           isalnum -  ப,  
                   楫  祭      ASCII,  ⥬  ᬮ
                   ⠡.      true     頥  㫥
                   祭  0  false.   ।  ⮫쪮  
                   ⮬  砥,  ᫨  isascii(c)  ࠢ true  c =
                   EOF.

頥       isalnum 頥 㫥 祭 ᫨ c -
祭            㪢 (A-Z  a-z),   (0-9).

७ᨬ      isalnum 㯭  ⥬ UNIX.

ਬ:

#include<ctype.h>
#include<stdio.h>

int main(void)
{
   char c = 'C';
   if(isalnum(c))
      printf("%c - alphanumeric\n",c);
   else
      printf("%c - isn't alphanumeric\n",c);
   return 0;
}


isalpha

㭪             䨪樨 ᨬ.

⠪          #include <ctype.h>
                   int isalpha(int ch);

, ᮤঠ騩   ctype.h
⨯

ᠭ           isalpha -  ப,  
                   楫  祭      ASCII,  ⥬  ᬮ
                   ⠡.      true     頥  㫥
                   祭  0  false.   ।  ⮫쪮  
                   ⮬  砥,  ᫨ isascii(ch) ࠢ true  ch =
                   EOF.

                           ப,   ᯮ짮
                   㭪, ᫨ ᯮ ४⨢ #undef.

頥       isalpha 頥 㫥 祭 ᫨ ch -
祭            㪢 (A-Z  a-z).

७ᨬ      isalpha 㯭  ⥬ UNIX  ন
                   ⠭⮬ ANSI C.

ਬ:

#include<ctype.h>
#include<stdio.h>

int main(void)
{
   char c = 'C';
   if(isalpha(c))
      printf("%c - alphabetic\n",c);
   else
      printf("%c - isn't alphabetic\n",c);
   return 0;
}


isascii

㭪             䨪樨 ᨬ.

⠪          #include <ctype.h>
                   int isascii(int ch);

, ᮤঠ騩   ctype.h
⨯

ᠭ           isascii -  ப,  
                   楫 祭   ASCII,  ᬮ஬  ⠡.
                    true  頥 㫥 祭  0 
                   false.

                   isascii ।   楫 祭.

頥       isascii 頥 㫥 祭 ᫨ 訩
祭            ch     0  127 (0x00-0x7F)

७ᨬ      isascii 㯭  ⥬ UNIX.

ਬ:

#include<ctype.h>
#include<stdio.h>

int main(void)
{
   char c = 'C';
   if(isascii(c))
      printf("%c - is ascii\n",c);
   else
      printf("%c - isn't ascii\n",c);
   return 0;
}


isatty

㭪            ந ஢  ⨯ ன⢠.

⠪          #include<io.h>
                   int isatty(int handle);

, ᮤঠ騩   io.h
⨯

ᠭ           㭪 isatty ।,    ᫥
                     ⨯  ன      ࠬ
                   handle:

                   - ନ.
                   
                   - ᮫.
                   
                   - ਭ.
                   
                   - ᫥⥫ .

頥       ᫨ ன⢮  ᨬ, 㭪
祭           isatty 頥 㫥 祭, ᫨ 
                   ன⢮  ⭮    ⠪  ⨯,  㭪
                   isatty 頥 0.

७ᨬ      isatty 㭨쭠  DOS.

ਬ:

#include<stdio.h>
#include<io.h>

int main(void)
{
   int handle;
   handle = fileno(stdout);
   if(isatty(c))
      printf("ਯ %d - ⭮  ன\n",handle);
   else
      printf("ਯ %d -  ⭮  ன\n",handle);
   return 0;
}


iscntrl

㭪             䨪樨 ᨬ.

⠪          #include <ctype.h>
                   int iscntrl(int ch);

, ᮤঠ騩   ctype.h
⨯

ᠭ           iscntrl -  ப,  
                   楫 祭   ASCII,  ᬮ஬  ⠡.
                    true  頥 㫥 祭  0 
                   false.   । ⮫쪮  ⮬  砥,  ᫨
                   isascii(ch) ࠢ true  ch = EOF.

                          ப,    ᯮ짮
                   㭪, ᫨ ᯮ ४⨢ #undef.

頥       iscntrl 頥 㫥 祭 ᫨ ch -
祭            ᨬ 㤠   ࠢ騩 ᨬ
                   (0x7F  0x00-0x1F)

७ᨬ      iscntrl 㯭  ⥬ UNIX  ন
                   ⠭⮬ ANSI C.

ਬ:

#include<ctype.h>
#include<stdio.h>

int main(void)
{
   char c = 'C';
   if(iscntrl(c))
      printf("%c - ࠢ騩 ᨬ\n",c);
   else
      printf("%c -   ࠢ騬 ᨬ\n",c);
   return 0;
}



isdigit

㭪             䨪樨 ᨬ.

⠪          #include <ctype.h>
                   int isdigit(int ch);

, ᮤঠ騩   ctype.h
⨯

ᠭ           isdigit -  ப,  
                   楫  祭   ASCII,  ᬮ஬ ⠡.
                    true  頥 㫥 祭  0 
                   false.    । ⮫쪮  ⮬ 砥,  ᫨
                   isascii(ch) ࠢ true  ch = EOF.

                           ப,   ᯮ짮
                   㭪, ᫨ ᯮ ४⨢ #undef.

頥       isdigit 頥 㫥 祭 ᫨ ch -
祭             ('0'-'9')

७ᨬ      isdigit 㯭  ⥬ UNIX  ন
                   ⠭⮬ ANSI C.

ਬ:

#include<ctype.h>
#include<stdio.h>

int main(void)
{
   char c = 'C';
   if(iscntrl(c))
      printf("%c - \n",c);
   else
      printf("%c -   ன\n",c);
   return 0;
}


isgraph

㭪             䨪樨 ᨬ.

⠪          #include <ctype.h>
                   int isgraph(int ch);

, ᮤঠ騩   ctype.h
⨯

ᠭ           isgraph -  ப,  
                   楫 祭   ASCII,  ᬮ஬  ⠡.
                    true  頥 㫥 祭  0 
                   false.   । ⮫쪮  ⮬  砥,  ᫨
                   isascii(ch) ࠢ true  ch = EOF.

                          ப,    ᯮ짮
                   㭪, ᫨ ᯮ ४⨢ #undef.

頥       isgraph 頥 㫥 祭 ᫨ ch -
祭           ⠥ ᨬ (筮 isprint), ᪫
                   ᨬ ஡.

७ᨬ      isgraph 㯭  ⥬ UNIX  ন
                   ⠭⮬ ANSI C.

ਬ:

#include<ctype.h>
#include<stdio.h>

int main(void)
{
   char c = 'C';
   if(isgraph(c))
      printf("%c - ᪨ ᨬ\n",c);
   else
      printf("%c -   ᪨ ᨬ\n",c);
   return 0;
}


islower

㭪             䨪樨 ᨬ.

⠪          #include <ctype.h>
                   int islower(int ch);

, ᮤঠ騩   ctype.h
⨯

ᠭ           islower -  ப,  
                   楫 祭   ASCII,  ᬮ஬  ⠡.
                    true  頥 㫥 祭  0 
                   false.   । ⮫쪮  ⮬  砥,  ᫨
                   isascii(ch) ࠢ true  ch = EOF.

                          ப,    ᯮ짮
                   㭪, ᫨ ᯮ ४⨢ #undef.

頥       islower 頥 㫥 祭 ᫨ ch -
祭            㪢   ॣ ('a'-'z')

७ᨬ      isdigit 㯭  ⥬ UNIX  ন
                   ⠭⮬ ANSI C.

ਬ:

#include<ctype.h>
#include<stdio.h>

int main(void)
{
   char c = 'C';
   if(islower(c))
      printf("%c - 㪢   ॣ\n",c);
   else
      printf("%c -   㪢   ॣ\n",c);
   return 0;
}


isprint

㭪             䨪樨 ᨬ.

⠪          #include <ctype.h>
                   int isprint(int ch);

, ᮤঠ騩   ctype.h
⨯

ᠭ           isprint -  ப,  
                   楫  祭     ASCII ᬮ஬ ⠡.
                    true  頥 㫥 祭  0 
                   false.    । ⮫쪮  ⮬ 砥,  ᫨
                   isascii(ch) ࠢ true  ch = EOF.

                           ப,   ᯮ짮
                   㭪, ᫨ ᯮ ४⨢ #undef.

頥       isprint 頥 㫥 祭 ᫨ ch -
祭            ⠥ ᨬ (0x20 - 0x7E)

७ᨬ      isprint 㯭  ⥬ UNIX  ন
                   ⠭⮬ ANSI C.

ਬ:

#include<ctype.h>
#include<stdio.h>

int main(void)
{
   char c = 'C';
   if(isprintt(c))
      printf("%c - ⠥ ᨬ\n",c);
   else
      printf("%c -   ⠥ ᨬ\n",c);
   return 0;
}


ispunct

㭪             䨪樨 ᨬ.

⠪          #include <ctype.h>
                   int ispunct(int ch);

, ᮤঠ騩   ctype.h
⨯

ᠭ           ispunct -  ப,  
                   楫 祭    ASCII  ᬮ஬  ⠡.
                    true  頥 㫥 祭  0 
                   false.   । ⮫쪮  ⮬  砥,  ᫨
                   isascii(ch) ࠢ true  ch = EOF.

                          ப,    ᯮ짮
                   㭪, ᫨ ᯮ ४⨢ #undef.

頥       ispunct 頥 㫥 祭 ᫨ ch -
祭            ᨬ ࠧ⥫ (iscntrl  isspace)

७ᨬ      ispunct 㯭  ⥬ UNIX  ন
                   ⠭⮬ ANSI C.

ਬ:

#include<ctype.h>
#include<stdio.h>

int main(void)
{
   char c = 'C';
   if(isprintt(c))
      printf("%c - ᨬ ࠧ⥫\n",c);
   else
      printf("%c -   ᨬ ࠧ⥫\n",c);
   return 0;
}


isspace

㭪             䨪樨 ᨬ.

⠪          #include <ctype.h>
                   int isspace(int ch);

, ᮤঠ騩   ctype.h
⨯

ᠭ           isspace -  ப,  
                   楫  祭     ASCII ᬮ஬ ⠡.
                    true  頥 㫥 祭  0 
                   false.    । ⮫쪮  ⮬ 砥,  ᫨
                   isascii(ch) ࠢ true  ch = EOF.

頥       isspace 頥 㫥 祭 ᫨ ch -
祭            ஡,  ⪨, 室   -
                   , ⨪쭠   ⠡      ࠭
                   (0x09-0x0D, 0x20)

७ᨬ      isspace 㯭  ⥬ UNIX  ন
                   ⠭⮬ ANSI C.

ਬ:

#include<ctype.h>
#include<stdio.h>

int main(void)
{
   char c = 'C';
   if(isspace(c))
      printf("%c - ᨬ ࠧ⥫\n",c);
   else
      printf("%c -   ᨬ ࠧ⥫\n",c);
   return 0;
}


isupper

㭪             䨪樨 ᨬ.

⠪          #include <ctype.h>
                   int isupper(int ch);

, ᮤঠ騩   ctype.h
⨯

ᠭ           isupper -  ப,  
                   楫  祭     ASCII ᬮ஬ ⠡.
                    true  頥 㫥 祭  0 
                   false.    । ⮫쪮  ⮬ 砥,  ᫨
                   isascii(ch) ࠢ true  ch = EOF.

頥       isupper 頥 㫥 祭 ᫨ ch -
祭            㪢  孥 ॣ (A-Z).

७ᨬ      isupper 㯭  ⥬ UNIX  ন
                   ⠭⮬ ANSI C.

ਬ:

#include<ctype.h>
#include<stdio.h>

int main(void)
{
   char c = 'C';
   if(isupper(c))
      printf("%c - 㪢  孥 ॣ\n",c);
   else
      printf("%c -   㪢  孥 ॣ\n",c);
   return 0;
}


isxdigit

㭪             䨪樨 ᨬ.

⠪          #include <ctype.h>
                   int isxdigit(int ch);

, ᮤঠ騩   ctype.h
⨯

ᠭ           isxdigit -           ப,      
                      楫   祭       ASCII
                   ᬮ஬  ⠡.    true      頥
                   㫥  祭  0  false.   ।
                   ⮫쪮  ⮬ 砥,  ᫨ isascii(ch) ࠢ  true
                    ch = EOF.

頥       isxdigit 頥 㫥 祭 ᫨ ch -
祭            ⭠筠  (0-9, A-F, a-f)

७ᨬ      isxdigit 㯭  ⥬ UNIX  ন
                   ⠭⮬ ANSI C.

ਬ:

#include<ctype.h>
#include<stdio.h>

int main(void)
{
   char c = 'C';
   if(isxdigit(c))
      printf("%c - ⭠筠 \n",c);
   else
      printf("%c -   ⭠筮 ன\n",c);
   return 0;
}


itoa

㭪            ८ࠧ  楫 祭  ப ᨬ.

⠪          #include<stdlib.h>
                   char *itoa(int value, char * string, int radix);

, ᮤঠ騩   stdlib.h
⨯

ᠭ            㭪  ८ࠧ  祭  value  ப
                   ᨬ,  稢  㫥,      뢠
                   १    ࠬ  string.    㭪樨 itoa
                   祭 value - 楫.

                   ࠬ radix  ।  ,    㤥
                   ᯮ짮  ८ࠧ 祭 value;  
                        2  36 (⥫쭮).  E᫨
                   祭 value ⥫쭮,   祭 radix 10,
                    ᨬ ப string -   (-).

                   ਬ砭: ࠭⢮, 뤥塞  ࠬ
                   string     ,  ⮡  
                   祭    १  ࠡ  㭪樨 ப,
                    㫥    (\0).  㭪  itoa  
                     17 .

頥       㭪 頥 㪠⥫  ப string,
祭           祬 襭  訡  .

७ᨬ      itoa 㭨쭠  DOS.

 ⠪       itoa, ultoa

ਬ:

#include<stdlib.h>
#include<stdio.h>

int main(void)
{
   int number = 12345;
   char string[25];
   itoa(number,string,10);
   printf(": %d, ப: %s\n",number,string);
   return 0;
}

