
   .    .   " OS/2 "                        2


                              



* ⠭ OS/2.
*  CONFIG  CMD.
* ࢠ ணࠬ OS/2.
* ଠ 㬥樨 API.
* 訡   㭪権 API.


        ⮩      㤨  ⠭  । 襩 樮
⥬, ⠪   ᬮ ࠧࠡ뢠 ணࠬ OS/2  몥  ;
⥬ :    묨 묨 㭪ﬨ API,  ⮡ 
 ,    㭪樨 宦    .

                          OS/2.

      ⮬ ࠧ  ⪮ 㤨  ᯥ ⠭ OS/2
 ࠧࠡ⪨  ணࠬ.    ७   室   ⠫
樨    ⠭  襩  ⥬, -     㪮⢥,
ਫ    ,    ⮬᪠  ணࠬ ன 믮
  ࠡ   䨣஢ ⥬.  ॥,   ⨬
  ४ਥ  䠩, 室   ᮧ ணࠬ, 
᭨  ᯥ ⥬,     
묨.

     ⠫ ᠭ    ᪮쪮     ᨨ
OS/2    㣮,  ⠪       묨    䠩     㣨
ᮡﬨ    㬥樨  襩  ⭮ ⥬.
 ᭮뢠  ᨨ Microsoft OS/2 1.0 .

                         
          
      ᨨ OS/2   䨣஢   ⥬
  樥  㧪,    OS/2,  ⠪    MS  DOS  (   MS-DOS  
ᮢ⨬,  ⨭  MS DOS).

       ᪮쪮 稭 ⮡ ন  MS DOS .  
  砥    ⮬,      ணࠬ  MS  DOS  
ࠡ      ᮢ⨬.   筮, ᫨   :      
,:    ⠢  MS DOS     ⠭ OS/2 
㣮, ࠭ ⠪ ࠧ  .  ᫨:   
⮫쪮  設, 訬 室 㤥   㧪.

     롥  㧪 ணࠬ ன. ⠭  ࠧ
⥬, :   ⥬  롨ࠥ  MS  DOS    OS/2    ࠧ, 
㦠 ⥬.  ४祭   樮묨  ⥬
  १㪨  ⠪ 㤮,  祭  몫祭  
ᮢ⨬,     ᥪ㭤,   ,  ᫨
  ࠭ ᢮   MS DOS, ࠡ 筮 ⠪  , 
筮.

                             .

     OS/2 ⮨   讣  ᫠ 䠩  ࠧ ⨯, ࠧ
襣, 祬 MS DOS .  ⥬ ४   䠩  
   ᮧ         ᯮ짮   ணࠬ   ⮬᪮
樠樨, 祭    OS/2, ⠪   , ᫥ 
㪮⢠.



       ᯮᮡ  ᯮ ४ਨ ᯮ㥬, 
OS/2.  ⭮  ᯮ    ⫨    ᨬ  
ᯮ짮    ணࠬ    ⠭           祫,
䨣饣 ⥬, ⠪      㤥   
   ४਩ OS/2.   襬       䠩,
ᯮ㥬  ⥬.

                              

     ࠧ  樮  ⥬.  䠩 OS2BIO.COM  
OS2DOS.COM         COMMAND.COM,   ࠡ⠥ 
  ᮢ⨬,    COM.EXE  (  CMD)   ࠡ⠥ 
饭  ०.      䠩  ᮮ   䠩   IBMBIO.COM,
IBMDOS.COM   COMMAND.COM   MS-DOS .  ࠢ騩 ᥠᠬ  SHELL.EXE
    ४    ணࠬ     ॠ 
饭 ०.   砥 蠬 [Ctrl] [Esc] .

      OS/2 ⠭,  ⥬ 䠩 筮 
 ୥ ४ ᪠, ᯮ㥬  㧪 ⥬.

	      :

    OS/2  ᯮ    ᭮  ⠪    ⨫,     MS-DOS,
    ᯮ짮  २ OS/2.  ਬ, ணࠬ
OS/2  DISKCOPY    ᯮ짮  ,  祬 640 , ⠪ 
 ᪥  ᮪ ⭮        ࠧ ᠭ 
  ᪮஢   ⭮ ᯮ짮  ᪠.    
 㣨  ⨫ ⠪  FORMAT, EDLIN, SORT  
XCOPY .   設⢥  砥   MS-DOS  ᨨ   ⨫ 
 ࠡ  饭 ०.

             ७  .DLL  .   
      樮   ⥬,      㦠  
뢠  ணࠬ ⮫쪮 ⮣,   室. ਬ,
KBDCALLS.DLL  㦠    ६  ࠡ,       ।
⥬,  ᯮ  ଠ  騪    ⮬,    ணࠬ
뢠  㭪 API . 設⢮  䠩 室
 ࠡ ணࠬ.

         ন  㭪樨   ࠭ 
४䨣樨  ⥬    ࠧ  ࠭.      ᯥ稢
ࠧ 䨣  ଠ      ..   
䠩 ᯮ ७ .DCP .

         ७  .SYS .   ࠩ ࠭
  㣮 ਨ.    ࠩ ᠭ ᯥ樠쭮  
ࠡ    筮  ।.     ࠩ  MS-DOS    
ࠡ.  ᫨      ॡ 㦨  ࠩ஬
६,      ,     ६  㣨
    ।         ன ⮫쪮 ᫥
ࢮ.   ॡ  ᫮ ࠩ஢ 祬  MS-DOS.



        :   ࠧ   䠩   ᮤঠ  ணࠬ,
ᯮ㥬    ࠧࠡ⪨  ணࠬ  ᯥ祭.  
/騪  ⨫ MAKE,  LINK, LIB  ᨨ  ⫠稪
 ॠ쭮  饭 ०.

      INCLUDE  LIB :     㣨  , ४
INCLUDE ᮤন  䠩, ⠪,  STDIO.H. ⨯ 㭪権
API ᮤঠ  娨 䠩  ७ ..  䠩  
ࠡ  API 㭪ﬨ OS/2,    㤨 .

     ४ LIB  ᮤন 䠩  .LIB   .OBJ,   
ᯮ     㭪権   ணࠬ .   
ᯥ稢 ࠧ    ࠧ  饩 窨.
  ⥬     ⠭,        䠩
ࠨ  ᮮ⢥饩 .

     ⠭ ⮫쪮 室 ⥪, ⠪    祭
訥.   ਬ,   ᫨    襩   ⥬     ⥬᪮
ᮯ,  ⥪    㭪権    ⠭.    樨
  ப    ।,       ⠭
⥪ ᯮ  ⭮ ࠡ.

       :   ᫨     ᮡࠥ  ࠡ   
ᥣ⭮  窨,      室  䠩  窨.  
    ᥣ⮢,    ९    設,   
ࠡ騥  ணࠬ              㯭
⨢ .   ⥬ ᮧ   䠩  ⮬᪨, 
  室    ⥬      ᮮ⢥⢨  ⢮
ଠ樨,    室  모     .      䠩
뢠 SWAPPER.DAT .

       窨      祭  訬.   ᫨      
ணࠬ,      ⥬  㦭 㤠   
  ᪠ 㣮 ணࠬ,     
SWAPPER.DAT . ⥬ ⮬᪨ 㢥 䠩  ⮣ ࠧ, 
  筮 ࠭⢠  ᪥.  ⢮  㠫쭮
, 㯭 ⥬ ࠢ  ⨢  
⢮ ᢮ ࠭⢠  ᪥.

         10,  饭  ,   ᬮਬ  ஡ 
ਢ ਬ,   㯭 ⨢   墠⠥  
⥬  ᮧ 䠩 窨.

                             
           
      䨣樨  OS/2 뢠  CONFIG.SYS - ⠪    
MS-DOS.     믮,    㦠  OS/2.   CONFIG.SYS
ਬ   ,   :  ᮡࠥ ४  
 ᮢ⨬  饭 ० OS/2. ᫨ :    
 㧪,  䨣  MS-DOS 㤥 뢠 CONFIG.SYS,
 OS/2 - CONFIG.OS2.

        CONFIG.OS2   ⠭   ஥   ᫮   ࠧ
ࠬ஢.  OS/2 設⢮   ࠬ஢ 易  ᠬ
ᯥ묨  筮  ।.    ⮬ ࠧ   ᬮਬ
  祢    䨣権,  ᯮ㥬   筮
ࠧࠡ⪥ ।.     , 祬   襬  , -
ᠭ  㣨        ⠫  ,       㤥
ᬠਢ,    㪮⢥.

      Buffers  -   䨣樨,   । ⢮
 ஢  䠩 ᪠ ( 楫 ⠪ ,    MS  DOS).
筮  OS/2 ॡ  ஢, 祬  MS-DOS. 誮  讥
⢮  ஢ ⭮  㬥蠥 , ⠪      
 512  . C  㣮 ஭,       ।
ணࠬ:    祬     ணࠬ,  ᯮ   䠩,  ࠡ
६, ⥬  ஢ 㦭 ᯮ짮. ଠ:

 buffers=35

।  祭  50    ।  ஡  墠⪮
஢   筮 ०.

      Libpath   ᯮ짮     ।   ᯮ
⥪ ᪮ . 

 libpath=c:

।,    䠩  ᪮   室  ୥
४ਨ ன⢠ .    ᯮ짮 ᪮쪮 ⥩,  ᫨
 ࠧ 窠  ⮩.

      Memman 롨ࠥ  樨  ࠢ .  ࢠ  swap 
noswap ।   ⥬ ᪨뢠  뢠 ᥣ  
       ᪠   .        窨
ᥣ⮢      ᮡ  OS/2    室,  
६  ࠡ  ᪮쪮    ணࠬ    ᫨誮
,        ⠭   swap.    -
move    nomove,  ।  -      OS/2 ६ ᥣ
  .  筮,     ⠭  move.   
ࠧ, ਬ   룫拉 ⠪:

  memman=swap,move

        ।  ⨯  ,  ⠪      ⥬
ॠ쭮   ६,      த⢨   쬠   筮  
    樮  ⥬  ।  ꥪ 
 ᯮ 樨 noswap  nomove.

    Swappath   ।,      ᯮ  䠩  窨,   
ᥣ ࠡ ணࠬ ᪨뢠  .   ଠ

 swappath=c:\swapdir

 swapdir -  ४  ன 㤥 ᯮ 䠩  窨
( 筮 뢠 swapper.dat).    ⢨⥫쭠  ⮫쪮
  砥,  ᫨  窠  ࠧ襭   memman.   窨
筮 ᯮ  ୥ ४ਨ.



      Protectonly       ᯮ짮     饭   
ᮢ⨬  ॠ쭮   ०,          640,  筮
ᯮ㥬  ணࠬ  ॠ쭮  ०,  㯭   ணࠬ
饭 ०. ଠ:

 protectonly = yes

    ᫨  㦭      饭 ०   ᫨ 
㢥७,     㤥 ᪠ ணࠬ ॠ쭮  ०,
 ⮩     ⠭  yes.    㣮 ஭,
   ⠭  no (   㬮砭), ⮡  
ᯮ짮   ணࠬ      饭   ०,   ⠪    
ᮢ⨬.

      Rmsize  ᯮ    ।,  ᪮쪮    640
㦭 १ࢨ஢  ணࠬ ॠ쭮 ०.  ᫨:   ࠫ
protectonly =no,:      ࠭祭 ,
㯭 ணࠬ ॠ쭮 ०  祭, 訬 祬
640. ਬ:

 rmsize=300

      ,    ஥  ࠭⢮       
樮 ⥬.

      Shell   㦠          ॠ쭮    ०
command.com, ।     宦 ⮣  .   
ணࠬ  command.com    ᪮쪮  祩 (㬥⮢ 
ப), ਬ, 

 shell=c: os2sys command.com/e:512

 ⮫쪮 ।    command.com,      ⠭ ࠧ
㦥 ࠢ 512 .



      Protshell ᯮ  㧪  ᪠ ᥫ ணࠬ
    ।      饭   ०.
ਬ:

 protshell=c: shell.exe c: cmd.exe c: os2init.cmd

 shell.exe - ᥫ ணࠬ   cmd.exe -  
饭  ०.         䠩     
믮,    믮  cmd.exe.     襬  ਬ   㤥
믮  䠩 os2init.cmd .


    Device ⠪        MS DOS.  㪠뢠 ⥬  ⠭
ᯥ樠 ࠩ ன    室.  ਬ 

 device=c os2 mousea04.sys

 ।   ࠩ  MOUSEA04.SYS .

     ࠢ  ⢨ﬨ ஢騪   ᯮ짮  
.  ⠭ 室騥  祭  㬮砭   筮
 㦤     祭   ஫   ᢥ
 ࠡ ஢騪.

      Timeslice  ⠭  쭮    ᨬ쭮  祭
⮢ ६  ஢騪  뤥 .    㬮砭
祭  ६ -  ᪮쪮 ⥭ ᥪ㭤    
  . ଠ :

 timeslice=50,100

  ࢮ ᫮  - 쭮  祭   ६,  ஥ -
ᨬ쭮.  쭮,          祬  31  ᥪ  
ᨬ쭮     祬 쭮.  ᨬ쭮  
  ய饭    ⮬   砥  ⥬    ᨬ쭮   
쭮 祭 ࠢ묨.

      Maxwait ।  ᨬ ६   .  ᫨ 
⥬ ࠡ  ᮢ,  㦨  ண 
  ன ᪮쪮 ᥪ㭤.  ᨬ쭮 ६   
 ⠭  । 祭.  ଠ :

  maxwait=2

  祭  㪠   ᥪ㭤.       ਮ
          㦥      ६  ६
蠥  ࠭ 㦨 .

	             
        
      䠩 ⮬᪨ 믮    樮
⥬,    ⮬⥫쭮 ࠡ.  
䠩 믮 ⮬᪨   㧪 ⥬;   ᬮਬ
 .    MS  DOS ⮬᪨  믮塞   㧪  䠩
 AUTOEXEC.BAT .

       OS/2  ᯮ    ࠧ  ⮬᪨  믮塞
䠩.    STARTUP.CMD  믮    ⥬  㦠  
饭  ०    䠩  AUTOEXEC.BAT  -    ᯮ  
ᮢ⨬.

       ७ .CMD  ।   䠩, ࠡ騥 
饭 ०,  . BAT -ࠡ騥   ॠ쭮 ०      MS
 DOS.   饭 8 䠩  ७ .BAT    
  䠩      믮,   ॠ쭮 ०  믮
䠩  ७ .CMD.

     STARTUP.CMD:     ᪠    䠩  믮  㧪
OS/2.  ࠥ   ஫  饭 ०   AUTOEXEC.BAT  MS
 DOS . ⨬    STARTUP.CMD 믮 ⮫쪮  ⮣ 
᪠ ࢠ ࠭ 㯯.  ᫨:     ࠭
㯯 ଠ樨  । ᠭ  STARTUP.CMD,  㤥.

       ⢨⥫쭮, STARTUP.CMD    ᪮쪮 易⥩ 
饩 ⥬.   믮   os2init,  䠩  ।
ࠢ 㣮 ⭮ 䠩 OS2INIT.CMD .

      OS2INIT.CMD:     ⥬    ࠡ    몥  OS2INIT.CMD
 ⠭  ६  ।  ⮡  ᪮䨣஢ ⥬ 
ᯮ짮    㣨 । ࠧࠡ⪨.    
⠭  ⭮    LIB,  INCLUDE    㣨 ६
ᯮ㥬 ஬.    PATH     ⠭ ⠪
⮡ ࠧ ।⢠ ࠧࠡ⪨ 砫   ४ਨ.

      OS2INIT.CMD 筮  믮 ⮬᪨   砫  
ᥠ 祭 .

     ᫨:  ᯮ ०  㧪 AUTOEXEC.BAT  ࠡ⠥
 MS DOS ⮣    㣮 䠩 AUTOEXEC.OS2, 믮   ࢮ
祭  ᮢ⨬ OS/2.

	                 
        
        ᮡࠥ  ணࠬ       
ࠡ⠥   ( 㯮  ࠭   ।   
ᯮ  Microsoft  ,  㣨   
⫨).

        ਬ ணࠬ   ⮩   뫨  ᪮஢ 
ᯮ짮 ᫥饩  ப  

 Microsoft:
cl -Lp -G2 -Zp %1.c

    ᬮਬ  ࠧ 樨 ᯮ㥬   ⮩ ப. -
ணࠬ cl.exe 砥   ⠪  騪 (  
᫨  맢   騪  ⤥쭮).

      Lp     ⮫쪮    OS/2 ࠧ
믮 䠩  ࠡ⠥  饭 ०.   ࠧ
믮 䠩   ᮢ⨬   ᯮ짮 
-Lc  ( 樨  ࠧ  ᮬ ⠪  ⮩, ⠪  /Lp 
-Lp     ).

      -G2  ⠭ ⢮  ய  80286.
 ⮩ 樨  ࠭稢 ⢮  8086.   
㤥  ࠡ,        २⢠ ⥫ 
80286,   १  ணࠬ         ࠡ
.

       -Zp           ணࠬ ᯮ
.  ᯮ짮    㬥,        
뢠 㯠 童   ࠭  .  
,   OS/2, ⠪     ࠭    
 襩 ணࠬ  API OS/2.

      ணࠬ ﭭ  ᯮ  -  AL, 
।  ᯮ짮  让 .    
⠪ 訥 ணࠬ,  㦭 ⢮ ᥣ⮢    
.  ⠪ 砥   뫪     
㪠⥫ﬨ far (32 ).   । ,    
맢  㭪   ⥪       㬥⠬     
㪠⥫ﬨ        far  -ᨨ   㭪権, 
 ⮬᪨, ᫨  ᯮ  让 .

       㣮  ஭  ᫨    ᯮ    让 
 뫪        ⠪ 㪠⥫ﬨ ⨯ far.
  ᪮॥ 㤮 祬 室   믮  ணࠬ.
 ਬ஢  ⮩   竨 訬   㪠⥫ 
far    室, 祬 ᯮ짮   -  AL    
㪠⥫ ⨯ far .   ᭮ 뢠  㪠⥫   
⨯ far,     ⨯ near.

          ᯮ짮  ⨫  make    樨   
ணࠬ.  ,     ਬ஢  ⮩  ⮩ 
(.CMD)  䠩  ᮤঠ騩    ப    㬥⠬
묨 ,   䥪⨢.


	        
        
         㤥  ஢   ᪠ ணࠬ   ⮩
  饭  ०, 祭 㤮   । ࠡ騩  
⮬ ०.  ,  饥 ६ 㯭  ᪮쪮  ⠪
।஢.  Microsoft ᤥ   ।, ࠡ   饭
०.    MEP  室   ᮧ ணࠬ.    
ᮡࠥ 㣫㡫   ⠫  ᯮ짮 ⮣  ।,   
       㪮⢥  짮⥫.  ⪮
 室 祭 ⮣  ࠡ⠥  ।  
MEP   ᪮䨣஢ ⠪, ⮡ 室  㣮 ।.

     㣨 ᯮᮡ   ᯮ짮 ண ।  MS DOS
   ⥪⮢          ᮢ⨬.      
।஢ ணࠬ  ॠ쭮 ०  ⥬ ३  饭
०, ⮡ ࠭᫨஢    .   ࠧ:  
ᯮ짮 㦥   ।.   室   ࠡ⠥
  ,   墠⠥    ࠡ    ᮢ⨬
 :    ᯮ짮  .

       । :  㦥 ⠭  ⥬ OS/2  
⮢ ࠧࠡ뢠 ணࠬ.

	                       OS/2.

      筥   ࠧ     ⪨ ਬ஢.   ⨬
६஢    ⠪  室         ⥩襥
ணࠬ஢  OS/2.   ⠪ 㢨  ஡  
᫮ 楯権.

ணࠬ  sleep.c.

       ⥩ ணࠬ :     ᯮ짨
㭪権 API.

/* sleep.c */
/*  ⠭ ணࠬ  । ਮ */
 #define INCL_DOS
#include <os2.h>
main()
{
   print("Pause is beginning n");
   DosSleep(3000L);
   printf("Pause is over n");
   exit(0);
}

        ணࠬ  ᯮ  㭪  API  DosSleep()  
   뢠 ⠭ ணࠬ -  㦠   ᮭ
 । ६.   ਮ ६ ।   㬥⮬
㭪樨  襬 砥 - 3000 L .  ६  ᥪ㭤  ஥
⠭ ணࠬ.

     ⠩    ணࠬ,  ᪮    ᪮   
⠩ 믮.   㢨  ᮮ饭

Pause is beginning
Pause is ending

  襬 ࠭ ஥ -   ᥪ㭤 ᫥ ࢮ.

	㭪樨  API.

      㪮⢮ ணࠬ ஥ 砥  ⥬ OS/2 IBM 
Microsoft  ᮤন  ᠭ 㭪権 API .  ⨬  㪮⢮
室  ஢        ᮢ   
ࠢ쭮  ᯮ짮  㭪権.       ଠ樨 
ଠ ᯮ㥬   㪮⢠   ᫮  窠
 OS/2.   ⮩     ।⠢   ⮥ ᠭ 㭪権
API.   ᪠     㭪  ⨬ 㭪   
㬥  .     㭪樨 DosSleep():

           DosSleep()- প 믮 ⥪饩 楯窨
Ŀ
DosSleep(interval);                                             
unsigned long interval;  /*  প ६  㭤 */

     ᬮਬ    ᯥ   ⮩  㭪樨     ᯮ㥬
ଠ. -,   㭪樨 ᮤন  訥, ⠪  쪨
㪢.  ।    Microsoft  Programmer's toolkit ।﫠
ᠭ  㭪樨  API 訬 㪢,    ଠ  
⠡.  (  ⥬  ࠧࠡ⪨  IBM    ᯮ
⮫쪮 訥 㪢).

      㭪権  DosSleep -   extern unsigned  far pascal.   
㭪樨 API OS/2 ⠪ ⨯.  稬  .

     祢   ᫮   pascal   ।,     ࠬ  㭪樨
ࠧ  ⥪.  祢 ᫮ 砥,   㬥,
। 㭪樨 ( ᫥  ࠢ)   ⥪  . 
ଠ쭮 -㭪樨  ᫥  㬥 (  ࠢ)  
⥪  .   (  冷        㭪,
ਬ   printf(),   ᯮ짮   ६   ᫮   㬥⮢.
襭  pascal   쭥襬  ।,  뢠 㭪
㤠  㬥     ⥪        ࠢ  뢠饩
ணࠬ;    -㭪 뢠 ணࠬ   㤠
㬥.  襭 pascal ⠪   㭪樨  ᠭ
⮫쪮 訬 㪢.

     ணࠬ⠬      室 筮  ᯮ   ⮬
ᮣ襭   ᮤঠ ⥪.    ,   
㢨,    㤥   ।  㬥⮢  楯窠 - 
࣠樨 ⥪  .    㭪樨 API ᯮ  
  external (譨)  㪠⥫ ⨯ far .  設⢮ 㭪権
API  ⨯ unsigned () ⠪     訡
⠪ ⨯.         訡    ⨯
void (᢮).

	 㬥⮢.

     㪮⢮   ணࠬ   祭      Microsoft   toolkit
।  ⨯  㭪権      㬥⮢  ᯮ 䨪
祭   । typedef  #define . ਬ  㭪
DosSleep() 룫廊 ⠪:

USHORT DosSleep(ulTime)
ULONG ulTime;

     USHORT ।  ⨯ unsigned  int   ULONG -  unsigned long  .
   ⨯  ᯮ  ᠭ 㭪権   
   쭮 묨.   ਬ HSYSSEN  -   void far*  
PHDIR - unsigned  short far* .   ⨯ ᮪  ᠭ 㭪権 
    ணࠬ⮬ OS/2.   ⠥,
稭騥 । ᠭ  㭪権  ᯮ  ଠ
-⨯.     ⠪  ᠭ    室  뢠 
᫮ ⨯, :  砥 㭪. ⢥⢥ ᢮ 
㭪権  ⮩   ᯮ짮  .-⨯ .

     ⥬   ࠧࠡ⪨   IBM      ᯮ   ⨯  Microsoft-.
⢥⢨    ⨯    Microsoft  -     ⢨⥫
 饩 ᠭ  ਫ .

	                (h-䠩).
        
          㭪樨  API   室  ᯮ짮    ⨯
(।).  ⨯ ᥣ  ⥫   ⮣, ⮡ 
  訡  -  ᮮ⢥⢨    㬥.    OS/2
⨯ 室  । ⨯ ᠬ 㭪権  
 ⨯ int  extern unsigned far pascal.

            ᮡ⢥ ⨯   ⠢   
砫  襩  ணࠬ,   筮   㤮 ᯮ짮  
ᮡ࠭   䠩   ( header  files) ਫ   ⥬.
Microsoft  ।ᬠਢ  쬠  ७  ᯮᮡ  ࠢ ⨬
䠩   ⮣, ⮡ 㬥 ⢮ ਠ, 砥 
 室 䠩. ᬮਬ,   .

             #DEFINE:   ⨯   㭪権
ᮤঠ      䠩  -  BSESUB.H    BSEDOS.H  .  BSESUB.H
 ᮤন ⨯  㭪権   ࠢ ࠭  ன 
 (    㭪権 稭   㪢 "Vio",  "Kbd"  "Mou"
 ਬ - VioScrollDn) .   BSEDOS.H ࠢ ᥬ  ⠢訬
㭪ﬨ  ( 稭   㪢 "Dos").   BSEDOS.H  
 ⥫쭮    祬  BSESUB.H     ᥪ樨.  ᥪ
ᮤন ⨯  ⤥쭮 㯯 㭪権, ⠪,  ࠢ
䠩, ࠢ   প  ᥬ஢  ..  㯯
㦥   ன  #ifdef  #endif.    ᯮ짮 ᮮ⢥饣
।   室 䠩  襩 ணࠬ  㤥 祭  ⮫쪮
室  䠩 . ਬ, ⨯ 㭪樨 DosSleep
() 室  ᥪ樨 BSEDOS.H, ⢥⢥  প ᮢ 
楯祪.   ᥪ 稭  ४⨢:

 #ifdef INCL_DOSPROCESS

   稢   #endif . ᫨  室 䠩 ணࠬ  ᮤন
४⨢:

 #define INCL_DOSPROCESS

     䠩  BSEDOS.H  㤥 祭   ணࠬ.
         ⠪   ⠭    #define,  ਬ
INCL_DOSFILEMGR   㭪権, 易   䠩  INCL_DOSMEMMGR 
ࠢ , INCL_DOSDATETIME   প    ६ 
..

         :  䠩    ᯮ  
।  娨.   設 ⮩  ࣠樨 室 OS2.H.
⮡ ࠧ 䠩  뫨 祭  ணࠬ,  
ᮤঠ ४⨢:

 #include <os2.h>

  ᨨ OS/2 1.0 䠩  OS2.H   ⮫쪮   ४⨢:

#include "os2def.h"
#include "bse.h"

  ४⨢ #include    ᨨ OS/2 1.1   祭
䠩, ᮤঠ饣 ।  ࠢ饣 ।⠢ﬨ.

      OS2DEF.H ᮤন ।, ᯮ㥬   㣨 䠩
,  ⨯  ,  㯮  .  ⠪ ᮤন
   । .

       BSE.H  ᮤন ᫥騥 ४⨢:

#include <bsedos.h>
#include <bsesub.h>
#include <bseerr.h>

        䠩 ᮤঠ ⨯  ᪠ .  ᫥
BSEERR.H ᮤন । ᮮ饭  訡 ⠪ :

 #define ERROR_FILE_NOT_FOUND 2

 䠩  祭 让,     室 ⮫쪮 ⮣,   ⠪
䨪 訡 ᯮ   ।  ணࠬ.

             ?      ࠧ
ᯮᮡ  ᯮ짮  ᪮  ᯮ 䠩 
Microsoft - .

     ⥩訩  室  ⮨    ⮬,  ⮡      䠩
   ணࠬ.  ⮡ ᤥ  ᯮ ४⨢:

#define INCL_BASE
#include <os2.h>

 । INCL_BASE      䠩:  BSESUB.H, BSEDOS.H  
BSEERR.H. ⪮ ⠪  室    ,  ९
室 ᪮쪮  ⥫ ᥪ㭤   ࠢ  ᥬ ⨬
ਠ ( 60 ), :    ணࠬ.

      樨 ६ 樨:   ᯮ짮  ⮫쪮
 䠩     ᥪ樨 䠩  BSEDOS.H,   室.  ਬ
᫨  ⢥  㭪樥  API    ணࠬ    DosSleep(),
ᯮ:

#define INCL_NOCOMMON
#define DOS_PROCESS
#include <os2.h>

       INCL_NOCOMMON  室   ᪫祭   ᥪ権
BSEDOS.H,      㪠  ᯥ樠쭮.   DOS _ PROCESS
  ᥪ BSEDOS.H ᮤঠ ⨯ ࠢ ᠬ  
楯窠,  ᮤন DosSleep() .

      ࠧ ᪫ 䠩 BSESUB.H  BSEERR.H   砥
⮫쪮  ᥪ BSEDOS.H ᮧ ⠪ ࠧ 訩 室
䠩   樨. ⪮  , :   
 #define 㦭 ᯮ짮   㭪樨.   ⮬  ६,
   롮   祭   ⥩   BSEDOS.H,     ⠪
⥫쭮,  祭 - ᪫祭 楫 䠩.

      ⮩   ᯮ㥬 ஬ 室.  ᫨  ணࠬ
ᯮ ⨯ 㭪権  BSESUB.H,   砥  䠩:

#define INCL_SUB
#include <os2.h>

᫨ ணࠬ ᯮ 㪭    BSEDOS.H  砥   䠩
:

#define INCL_DOS
#include <os2.h>

᫨ ணࠬ ᯮ 㭪樨   䠩  砥    
㣮:

#define INCL_DOS
#define INCL_SUB
#include <os2.h>

  ᯮ㥬 䠩  BSEERR.H.   室  ᯮ짮
। 訡  ணࠬ   뢠  室 䠩.

        IBM   ᯮ ⠪  ᫮ ⥬.  
䠩 DOSCALLS.H  SUBCALLS.H ᮮ⢥ 䠩 BSEDOS.H  BSESUB.H
 ᯮ㥬    ⥬  Microsoft  -  .        䠩
    ணࠬ,     室;  #define 
ᯮ.

	᪫祭 䠩  (h-䠩).
        
       㣮  ᯮᮡ  ᯥ祭  ⨯  㭪権.  
   ᠬ  ⠢   ணࠬ. ਬ, 
   룫拉 ணࠬ  sleep.c, ᠭ   ⨯  
DosSleep():

/* sleep2.c */
/*  뢠 ⠭ ணࠬ  । ਮ  */
/*  ᯮ ⨯  ணࠬ  䠩  */
extern unsigned far pascal DosSleep(unsigned long);
main()
{
   printf("Pause is beginning n");
   DosSleep(3000L);
   printf("Pause is over n");
   exit(0);
}

      ⨬  䠩    樨 #define  ᪫祭.
᫨  ணࠬ  ᯮ 㣨  㭪樨,   ⨯ ⠪ 
 祭.  ⠪   ।  ணࠬ,   
䠩 .

     室  㤮, 祬 ᯮ짮 䠩 , 
    २⢠.  - ⠭  
⨯  㬥⮢  ᯮ㥬  㭪権:      ⠭ 
ணࠬ.   -  ணࠬ  ⥭樠쭮  ७ᨬ. ᫨
ᯮ   䠩 ,   童 
  ணࠬ    ᮮ⢥⢮      䠩   .
  ⥬  (ਬ  IBM    Microsoft)    ᯮ짮
ࠧ    ⠪,  ᫨  ᯮ 䠩 
ணࠬ,              ⥬,    
஢   㣮.  ᠭ   ᮡ⢥ ⨯ 
।     ⮩ ஡. , ᫨ 
  㯠  䠩  ᠭ ᮡ⢥ ⨯ 
।   㦨 ୠ⨢.

	筠 㭪   exit().
        
          ,       稫   ணࠬ   sleep.c
 筮  㭪樥    exit  .  ⠥    ᮢᥬ ࠢ
稢 ணࠬ OS/2  室 ࠢ १ ᫥
䨣 ᪮.   ᯮ짮 㭪樨  exit() ࠭,   
    ᫥.    設⢥ 砥,  ਢ
  ਬ  (᫨    ࠡ⠥  ᠬ⥫쭮  ⥬) ணࠬ
४᭮ ࠡ⠥   exit().   ᫨,   ᯮ exit(),
    㤭    묨  묨   㭪ﬨ
(ਬ printf()) .

      㤥  楯窨,  㢨,    
 exit() ᯮ API 㭪 DosExit() .

	㡮 ᮭ.
        
     㭪  DosSleep()  ⢨⥫쭮  ४頥  ࠡ  ணࠬ
sleep.c    頥 ࠢ  樮 ⥬.  ணࠬ 
室  横   ᮢ蠥 - ⢨,  砭
;      ᯮ  横  業ࠫ쭮    
⠭.  㭪   DosSleep()  㪠뢠   樮   ⥬
⠭  ⠩,  ⠪  ⮡    ,    㦭  
뢠 ணࠬ.  ⥬ 뢠 ணࠬ ⠭.

      祭 , ⠪     ⮢ 襩  樨
ணࠬ  筮 ।    横 .
᫨ :   ᯮ  横        㡨饥  ६
ன⢮   襩 ணࠬ,:    类    楫
⥬, ᯮ 横      ਬ 㣨
ணࠬ.

     㣨   ⮬  㭪樨  DosSleep()  , 
᫨ :   맮  ,   祭  㬥 0,  ⥬  
 ࠢ 樮 ⥬.  뢠 ணࠬ ᫥
⮣    ⮪  ᢮    ६,  砥 ᫥騩
஢ .       짮 ਬ DosSleep()  
祭  0      ,     ணࠬ   
樮 ⥬ ।  ࠢ 㣮 .   㧭
 ⮬    饭 ᠬ  楯窠.

	頥 : ணࠬ  beep.c
        
          ਢ     ணࠬ,  뢠
砭 ᨣ । ⥫쭮  :

 /* beep.c */
/*  drk.xftn cbuyfk */
 #define INCL_DOS
#include <os2.h>
main()
{
   unsigned frequency=500; /*     */
    unsigned duration=1000; /*  ⥫쭮  ᥪ㭤 */
    unsigned rc;            /*  頥  */
    if( rc=DosBeep(frequency, duration ) )
      { printf("DosBeep error=%u n", rc); exit(1); }
   exit(0);
}

   ணࠬ  ᯮ  㭪  DosBeep()  祭 ᨣ.
 㬥⠬  ⮩ 㭪樨     ()  ⥫쭮
ᨣ (ᥪ);  -  楫.

     :   ணࠬ  ࠭ 祣    
ᥪ㭤 㤥  ᨣ.

        DosBeep() -  砥 ᨣ
Ŀ
DosBeep(Frequency, Duration);                                   
unsigned Frequency;  /*     ( 37  32767) */   
unsigned Duration;  /*  ६  ᥪ㭤 */                

      ⫨稥 ⮩  ணࠬ  sleep.c  (஬ ⮣   
믮)  ,     beep.c   ஢騩
  ,  頥  㭪樥  API.      㯮  ࠭, 
頥 㭪ﬨ API ࠢ , ᫨   諮 ࠢ쭮, 
  訡, ᫨  㭪    ᬮ    ᢮   
᫥.  ணࠬ 뢠 頥   ६ rc , ᫨
  ࠢ , ⠥ ᮮ饭  訡  稢 ࠡ.

     ஢ઠ  頥         ⠫,  
뢠 㭪樨 API.  뢠 ਬ, ஢ઠ   쭮
.  ⮡  㬥  ࠭⢮,    ᠫ    
믮塞    १    if,      ப. 
⠭⭠ ଠ  㣨 ணࠬ  ⮩ .

       ஢ 頥 ?   ᥣ.   
 砥 ⥬, ஢ઠ 頥    ᫥
訡  室 ࠬ,  ⠪ ࠢ  㣨 ஡.
 㭪樨  API, ⠪,  DosSleep()  DosBeep(), 祭 ।
  訡,  ⠪   :   ⭮  ᬮ     
஢ન.   ᫨  :   ᮬ,   㭪 㤥   ६
ࠡ ࠢ쭮,:   ।ᬮ  襩 ணࠬ ஢
頥  .  筮,    쥧  ணࠬ :  
ᯮ짮   㤮   짮⥫ 孨, ⮡   
,  ந諠 訡.

     ᫨  饭 訡, :     ᬮ    祭  
ᠭ  㭪権    ਫ    ⮩         ࠢ筨
ணࠬ OS/2. ਬ, 㭪 DosBeep()   
   37  32767 (筮). ᫨   ணࠬ ⠪
  । DosBeep 祭  20, ᫥  ᪠ ணࠬ
 ࠭  ᫥饥:

 DosBeep error=395

 ᬮॢ 395  ᯨ᪥   訡  㢨,   ᮮ⢥
ᮮ饭   ERROR_INVALID_FREQUENCY   (⨬   ).   
    訡  ⭮      ⮫쪮  㭪樨
DosBeep().  㣨  ,  ⠪,     13  (  ERROR_INVALID_DATA   -
⨬ )  ਬ  㭪ﬨ.

᫥ 訡: ணࠬ  beep2.c.

         ਬ   訡,     㯮 㭪 API,
  ணࠬ ᠬ ,  ࠢ 訡  
⮬᪮  砭  ணࠬ.     ਢ ஢
ணࠬ  beep.c,    砥    㭪 DosErrorClass().
  ਬ  ⠪  뢠,    㭪樨 API  祭
뢠饩 ணࠬ.

/* beep2.c */
/*  砥 ᨣ, 頥 ଠ  訡 */
 #define INCL)DOS
#include <os2.h>
#include <stdlib.h>          /*    atoi() */
main(argc,argv)
int argc;
char *argv[];
{
   unsigned frequency;       /*     */
    unsigned duration;         /* ⥫쭮  ᥪ㭤 */
    unsigned rc;               /* 頥  */
    unsigned Class;            /*  訡 */
    unsigned Action;           /* ४㥬 ⢨ */
    unsigned Locus;            /* 稭 訡 */
    if( argc !=3)
      {printf("syntax: beep freq duration n",rc); exit(1);}
   frequency = atoi(argv[1] );
   duration = atoi( argv[2] );
   if( rc=DosBeep(frequency, duration) )  {
      printf("DosBeep error=%u n", rc);
      DosErrClass(rc, &Class, &Action, &Locus);
      printf("Class=%u, Zction=%u, Locus=%u n",
                                   Class, Action, Locus);
      exit(1);
   }
   exit(0);
}
          ࠡ   ⮩ ணࠬ  ᯮ짮 㬥
 ப    ⥫쭮 ᨣ.  ᫨  ⨬
ணࠬ        ⨬묨    祭ﬨ    ࠬ஢,   ஧
ᮮ⢥騩  ᨣ.    ᫨    맮    ⨬
祭 , ந ᫥饥:

C>beep2 20 500
DosBeep error=395
Class=7, Action=4, Locus=1

     頥    㭪 DosErrorClass() 뤠 
ࠧ  ᫠,  ।    訡,    ⢨ 
稭 訡.

        DosErrClass() -    訡
Ŀ
DosErrClass(Code, AClass, AAction, ALocus);                      
unsigned Code;           /* 頥  */                  
unsigned far *AClass;    /*   訡 */               
unsigned far *AAction;   /*  ४㥬 ⢨ */      
unsigned far *ALocus;    /*  稭 訡 */              

     祭  ६  Class  室       1  15.
    祭    祭  ६ Action  Locus 
    ᠭ  㭪樨  DosErrClass()  ࠢ筨 ணࠬ.
 7  ᠭ  "⭮ 訡  ணࠬ",    筮
業 筨 訡:    ணࠬ    ਭ  
짮⥫  騥  ⨬  祭. ⢨  4
-        筮  浪    ࠧ㬭 室.
稭  (筨  訡)  1  -    "⭠"  ⠪   㭪樨
 ⮫쪮 ன⢠ ந쭮 㯠  ᫥⥫
ன⢠   ⠪     ⥭.

     JIB<RB  DOS:  ஬    訡  API  맢   ࠢ
ᯮ짮 㭪権  API OS/2  ⠪    訡  DOS,
    ᠬ  樮 ⥬.     ᫥騩
ଠ:

 SYS0021: The drive is not ready

   ᠭ  訡  ᮢ   ࠢ    
祭  ᯮ짮 ⨫ OS/2  HELP.    HELP  
  -  訡.  襬 砥:   :

 C.help SYS0021

 頥 㬥   far -㪠⥫.
 
     㭪   DosErrClass()   頥      祭  뢠饩
ணࠬ: ⠪   । ६   㪠⥫,   
  祭    㭪樨      ᯮ짮   
㬥⮢,   ᠬ  㬥.   ⠪   㭪樨 API   ணࠬ
室  ࠧ ᥣ,   ᯮ짮 far- 㪠⥫.
᪨  ⨯ ⮩ 㭪樨   BSEDOS.H । ⨯   
ࠬ஢ ⠪:

 unsigned far *

 :     ⨭,   DosErrClass()   
  far-  㪠⥫.  祬       㯠  ।०   
?  ⮬    ⨯    䠩     ⠢
  ,       ᯮ짮    far- 㭪樨
 far- ᠬ (32 ).       ⨯
  ᮢ, ᯮ짮  ࠬ  API 㭪, 
  ᯮ짮   - AL (  ୮  ࠩ   
   Microsoft   -   ,   㣨         
ᯮᮡ묨  ⮬).

      :          㭪樨  DosErrClass,  
ࠬ । 㪢 ""   ⮣,   ⢥
  ࠬ஢       ᯮ짮       
㪠⥫ ( ᮣ襭  ࠡ⠥  砥 ப ASCIIZ ).

	ᯮ짮 । .
        
       ⨯ 㭪権 䠩 BSEDOS.H  BSESUB.H  ᮤঠ
।      ᯮ㥬  API.    ਬ, 
ਢ ணࠬ,  砥  ⥬   ६  뢮
  ࠭:

/* getdate.c */
/*  ⠥ ଠ  ⥬   ६ */
#define INCL_DOS
#include <os2.h>
main()
{
    struct _DATETIME datetime;   /*  ।    */
    unsigned rc;                 /*  頥  */
     if( rc=DosGetDataTime( &datatime ) )
       { printf("DosGetDaaTime error=%u",rc); exit(1); }
    printf("Hour=       %u n", datatime.hours);
    print("Minutes=     %u n", datatime.minutes);
    printf("Seconds=    %u n", datatime.seconds);
    printf("Hundredths= %u n", dataime.hundredths);
    printf("Day=        %u n", datatime.day);
    printf("Month=      %u n", datatime.month);
    printf("Year=       %u n", datatime.year);
    printf("Timezone=   %u n", datatime.timezone);
    printf("Day/Week=   %u n", datatime.weekday);
    exit(0);
}

   ணࠬ  ᯮ  㭪  DosGetDataTime()    祭
ଠ樨    ६    ,   ᯮ    ,
।  䠩 BSEDOS.H .  ਬ 뢮 ணࠬ:

Hour=          12
Minutes=       17
Seconds=       39
Hundredths=    59
Day=           21
Month=         9
Year=          1988
Timezone=      -1
Day/week=      1

       襩 設 ६     ⠭ 
DOS TIME  DATA, ⠪  ⥬ ந쭮 ⠭   ࠢ
-1.  㣨 祭 -  ,  ⠭  ६ 
   쭥襬 ন ⥬묨 ᠬ.

        DosGetDateTime()  - 뤠 ଠ    ६
Ŀ
DosGetDateTime(Adatetime)                                 
struct _DATETIME far *Adatetime;  /*    */  

  㭪    ⢥  ⢥  㬥  ᯮ  
  ⨯   struct  _DATETIME.    ।   ⮩   
ᮤন    Microsoft  -  ᪮  䠩    BSEDOS.H    
ࠢ筨 ணࠬ 룫廊 ⠪:

 typedef struct _DATETIME {
   UCHAR  hours;
   UCHAR  minutes;
   UCHAR  seconds;
   UCHAR  hundredths;
   UCHAR  day;
   UCHAR  month;
   USHORT year;
   SHORT  timezone;
   UCHAR  weekday;
} DATATIME;

UCHAR 砥  unsigned char,  USHORT -  unsigned int   SHORT - int.
    ᯮ짮  ࢮ砫쭮     ,       
祭  typedef -    ᭮  ,    ।塞
  襩 ணࠬ, ⠪    :

 struct _DATETIME datetime

   ᭮:

 DATETIME datetime

       ⨬ ﬨ  㤥 룫拉 ⠪:

 struct _DATETIME  {
   unsigned char  hours;
   unsigned char  minutes;
   unsigned char  seconds;
   unsigned char  hundredths;
   unsigned char  day;
   unsigned char  month;
   unsigned int   year;
   int            timezone;
   unsigned char  weekday;
};

 㤥 ᯮ짮 ⠪ ଠ    ⮩ .

	ᠭ  ᮡ⢥ । .

     㣮 室 ⮨   ஢ । 
 䠩     ᯮ짮 ᮡ⢥.    ਬ  
ਢ  ணࠬ   getdate.c             ᮡ⢥
।    _DATETIME.           
DateTime,  ࠭   童  .  ⠪  
⨯  㭪樨,    室,  ᫨    ᯮ  䠩
.

/* getdate2.c */
/*  ⠥ ଠ  ⥬   ६ */
/*  ᯮ  ।      ணࠬ       䠩
 */
/* ⨯ 㭪樨 */

extern unsigned far pascal DosGetDateTime(struct DateTime far *);
struct DateTime  {                   /*  ।  */
   unsigned char hours;
   unsigned char minutes;
   unsigned char seconds;
   unsigned char hundredths;
   unsigned char day;
   unsigned char month;
   unsigned int  year;
   int           timezone;
   unsigned char weekday;
};
main()
{
   struct DateTime datetime;   /*  ।  */
    unsigned rc;                /*  頥  */
    if( rc=DosGetDateTime( &datetime ) )
      { printf("DosGetDateTime error=%u",rc); exit(1); }
   printf("Hour=       %u n", datetime.hours);
   printf("Minutes=    %u n", datetime.minutes);
   printf("Seconds=    %u n", datetime.seconds);
   printf("Hudredths=  %u n", datetime.hundredths);
   printf("Day=        %u n", datetime.day);
   printf("Month=      %u n", datetime.month);
   printf("Year=       %u n", datetime.year);
   printf("Timezone=   %u n", datetime.timezone);
   printf("Day/week=   %u n", datetime.weekday);
   exit(0);
}

          㯮   室    २⢮,  
ணࠬ ⠭ ᨬ    䠩 .  
⠪         童 ⠪    ࠢ.
⪮  , :    ।   
  ணࠬ,      㦭 ( :   筮   ᮧ 
ᮡ⢥  䠩   , 稢        ᯮ㥬  
).

     ணࠬ ⮩  ᯮ 䠩    Microsoft  
। .   筮  ᤥ  ᨬ묨
 譨 䠩 ,    ணࠬ getdate2.c.

        ਭ 祭  0  23   ᥪ㭤 -  0
 59   ᥪ㭤 -  0   99  -  1  31  -   1
 12   -  1980  2079.  ᮢ   ࠧ  ६ 
  ⥪騬 ᮬ   ਭ祬 .   
 1  7.

     㭪  DosGetDateTime()  ᯮ   ⥪饥  祭   
稭   _DATETIME,   ணࠬ    .

     ⨬,  㭪  DosGetDateTime()  far- 㪠⥫ 
६  ⨯  struct  _DATETIME.        砥, ⠪ 
 뢠    㭪樥 ⨯  far .  ⥫쭮,
    㦭  ।  ⨯  (      ᪮  㢨,  
믮    㭪権 API).

	 ⠭   ६.
         
     ᫨     - ଠ     ६,
      ᤥ     㭪樨 DosSetDateTime(), 
ᯮ  ⠪      _DATETIME.    ਢ  ணࠬ,
⠭  祭  ᮢ  ,  ஥       
⠭       ६ DOS.

/* setzone.c */
/* ⠭ 祭 ᮢ  */
#define INCL_DOS
#include <os2.h>
main(argc,argv)
int argc;
char *argv[];
{
   struct _DATETIME datetime;   /*  ।   doscalls.h */
   unsigned rc;                 /*  頥  */
    if(argc != 2)
      { printf("Syntax: setzone zone n"); exit(1); }
   if( rc=DosGetDateTime( &datetime ) )
      { printf("DosGetDateTime error=%u",rc); exit(1); }
   datetime.timezone = atoi( argv[1] );
   if( rc=DosSetDateTime( &datetime ) )
      { printf("DosSetDateTime error=%u",rc); exit(1); }
   exit(0);
}

   ⢥  祭  ᮢ     ࠧ   
। ६ ਭ   ⥫묨 祭ﬨ  -    
ਭ       ⥫묨  -     ⮪.     祭   
⠭⭮ 宮᪮ ६   ࠢ ᥬ 㬭
 줥 .   ⠭  ⠪:

 C>setzone 480

 ணࠬ  ,  -,   ᯮ  DosGetDateTime()     ⥭
祭      datetime,  ⥬    timezone ,
-,  뫠    ଠ       ⥬     
DosSetDateTime().

  DosSetDateTime()  - ⠭ ଠ    ६
Ŀ
 DosSetDateTime(Adatetime);                                    
 struct _DATETIME far *Adatetime; /*    */       


     㭪  宦    DosGetDateTime()    ᯮ     
⢥ ࠬ:   ⨯ struct _DATETIME.

      ᫨    ⭮,   ᫥饥  ᯮ짮   ணࠬ
 getdate.c  㡥      ⮬,   setzone.c ⢨⥫쭮 
祭 ᮢ   ⥬.

	 ⨯ 㬥⮢ 㭪樨.
        
      ᫥饬 ਬ     ⨯    㬥⮢
API -㭪樨.   ணࠬ 뤠 ଠ  䨧᪮  ﭨ
⭮  ᪠    㣮  ன⢠  ⥬  䠩.   
ன⢠  (0=⥪饥  1=  2=    ..)    짮⥫  
 ப ணࠬ.

/* filesys.c */
/*  頥 ଠ  । ன⢥
                                    ⥬ 䠩 */
#define INCL_DOS
#include <os2.h>
#include <stdlib.h>
#define LEVEL 1                  /*  1=䠩  2=⮬ */

main(argc,argv)
int argc;
char *argv[];
{
   unsigned drive;               /*   ன⢠ */
                                 /* 0=⥪饥  1=  2=  .. */
   struct _FSALLOCATE buffer;    /*  ।   bsedos.h */
   unsigned size;                /*  ࠧ  */
   unsigned rc;                  /*  頥  */
   if(argc !=2 )
      { printf("Syntax: fileinfo drive# n"); exit(1); }
   drive = atoi(argv[1] );
   size = sizeof(struct _FSALLOCATE);
   if( rc=DosQFSInfo(drive, Level,
                        unsigned char far *)&buffer, size) )
      { printf("DosQFSInfo error=%u",rc); exit(1); }
   printf("File system ID =    %lu n", buffer.idFileSystem);
   printf("Number of sectors = %lu n", buffer.cSectorUnit);
   printf("Allocation units =  %lu n", buffer.cUnit);
   printf("Availavle units =   %lu n", buffer.cUnitAvail);
   printf("Bytes per sector =  %u n",  buffer.cSector);
   exit(0);
}

        ⢥ ࠬ  30-⮢ ⪨ 
. ணࠬ 뤠 ᫥饥:

 C>filesys 3
File system ID =    0
Number of sectors = 4
Allocation units =  15512
Available units =   7405
Bytes per sector =  512

      ᯮ   ଠ, ணࠬ   ਪ, 墠 
࠭⢠  ᪥  ⭮ 䠩, । ⥬   뢠
 ( ᪠   ⥬ 䠩  ᪥   8).

        DosQFSInfo -  訢 ଠ  䠩 ⥬
Ŀ
DosQFSInfo(Drive, Level, ABuffer, Buffsize);                         
unsigned Drive;        /*  ன⢠ 0=⥪饥  1-  .. */  
unsigned Level;              /* 1=ଠ  䠩  2= ଠ  
                                                         ⮬ */    
unsigned char far *ABuffer; /*     ଠ樨 */       
unsigned Buffsize;          /*  ࠧ  */                     

        _FSALLOCATE    ⫨筠  ⮩   室 
 BSEDOS.H   룫廊 ⠪:
 struct _FSALLOCATE {
   unsigned long idFileSystem;
   unsigned long cSectorUnit;
   unsigned long cUnit;
   unsigned long cUnitAvail;
   unsigned int cbSector;
};
      室  㯮     ᮣ襭     ᠭ   ,
ᯮ㥬   (   ) ।    䠩
 Microsoft  - h-䠩.   ࢠ 쪠  㪢  
ᮤন  ଠ    楫    ⨯    ६.   㪢
   㯯: 䨪,   楫 ६  
᭮,    ⨯  .   ਬ id  -  䨪,
騩 䨪,   - 䨪 騩 稪. 
b -  ᭮    ; ⠪ ࠧ   砥
६,  ᯮ㥬        ࠧ஬    1 .  㣨
᭮:

f   -    䫠   ᪮  ६,
ch -   ᨬ   us -  unsigned short.
 ᯨ᮪    㪮⢥ ணࠬ.

       㤥 ਬ  ᮣ襭  襩   ᪫祭
 砥  Microsoft ᯮ   ⮢ .

     ⨬,  ࠬ  Abuffer  filesys.c    ⮣,
⮡  ।०  訡   .   뫮  
⮬,   ⨯  DosQFSInfo()    ।    ,  
㪠⥫ ⨯ unsigned char,   ६   ᠬ   
㪠⥫ ⨯ struct _FSALLOCATE.

       㤥 ⠫   ⠪ 樥 筮 , 
⨯  ।    ࠧ஬    1  , ⮣   
樨 ᫥,    ன.

                 


     ⮩      㤨,   ⠭    ⥬ 
樨    ணࠬ    OS/2   ᬮ५ ணࠬ, 
ᯮ ᪮쪮   㭪権 API.    ,   ணࠬ
 ਮ⠭  ᥡ    DosSleep(),   ᨣ 
   DosBeep(),      ଠ      訡    
DosErrClass(),      ⠭  ६    ,  ᯮ
DosGetDateTime()  DosSetDateTime()    ଠ  ᪥  
DosQFSInfo()  .     ᭨,    ⨬   㭪  ।   
 㬥   ந室 ࠢ 訡.

      ࠧ,   訫  ࢮ ⢨  ࠩ
ࠬ ணࠬ஢   OS/2.       ᫠  
ࠢ ᥡ  ⥬,    ᬮ ८  㤭.

       ᫥饩      ਬ    ⥬  室 
ᬮਬ   㭪樨 API,  ।祭     
࠭. ⥬,  ᫥饩   ਪ᭥  ᠬ  OS/2 -
筮.