@ Procedure and Function [M-Z] 
:Print_Screen
%ͻ
%                          Procedure Print_Screen                           
%ͼ

 PROTOTYPE :
 Procedure Print_Screen;

 UNIT...: ~Unit MOS_ASM~
 IN.....: /                                                                
 OUT....: /                                                                
 EXPLAIN: Print the screen to the printer.                                 
 SEE ALSO..: 
    ~Printer_Init~

:Wait_VBL
%ͻ
%                            Procedure Wait_VBL                             
%ͼ

 PROTOTYPE :
 Procedure Wait_VBL;

 UNIT...: ~Unit MOS_ASM~
 IN.....: /                                                                
 OUT....: /                                                                
 EXPLAIN: Wait the vertical balay retrace.                                 

:Peek
%ͻ
%                               Function Peek                               
%ͼ

 PROTOTYPE :
 Function Peek(S,O:Word):Byte;

 UNIT...: ~Unit MOS_ASM~
 IN.....: S,O (WORD) = Segment and Offset of the address.                  
 OUT....: (BYTE) = Value of the byte at this address.                      
 EXPLAIN: Return the value of the byte at this address.                    
 SEE ALSO..: 
    ~Poke~

:Poke
%ͻ
%                              Procedure Poke                               
%ͼ

 PROTOTYPE :
 Procedure Poke(S,O:Word;Value:Byte);

 UNIT...: ~Unit MOS_ASM~
 IN.....: S,O (WORD) = Segment and Offset of the address.                  
          Value (BYTE) = Value of the byte to put at this address.         
 OUT....: /                                                                
 EXPLAIN: Put a the value byte at this address.                            
 SEE ALSO..: 
    ~Peek~

:Set_Video
%ͻ
%                            Procedure Set_Video                            
%ͼ

 PROTOTYPE :
 Procedure Set_Video(Status:Boolean);

 UNIT...: ~Unit MOS_ASM~
 IN.....: Status (BOOLEAN) : True = Screen On, False = Screen Off.         
 OUT....: /                                                                
 EXPLAIN: Put the screen on or off.                                        

:Main_Task
%ͻ
%                            Procedure Main_Task                            
%ͼ

 PROTOTYPE :
 Procedure Main_Task;

 UNIT...: ~Unit MOS_ASM~
 IN.....: See also Main_TaskBase                                           
 OUT....: See also Main_TaskBase                                           
 EXPLAIN: This procedure is the SAME as Main_TaskBase.                     
          This procedure is here to allow a "low call" of Main_TaskBase    
          because MOS_TSK is a high level Unit.                            
 SEE ALSO..: 
    ~Main_TaskBase~

:Warm_Reboot
%ͻ
%                           Procedure Warm_Reboot                           
%ͼ

 PROTOTYPE :
 Procedure Warm_Reboot;

 UNIT...: ~Unit MOS_ASM~
 IN.....: /                                                                
 OUT....: /                                                                
 EXPLAIN: Make a Warm Reboot.                                              
 NB.....: Be careful, you will lost all your work                          
 SEE ALSO..: 
    ~Cold_Reboot~

:Timer_SetFrequence
%ͻ
%                       Procedure Timer_SetFrequence                        
%ͼ

 PROTOTYPE :
 Procedure Timer_SetFrequence(Freq:Real);

 UNIT...: ~Unit MOS_ASM~
 IN.....: Freq (REAL) : New frequency of the clock in Hz                   
 OUT....: /                                                                
 EXPLAIN: Define the frequency in Hz of the internal clock.                
 EXAMPLE: Timer_SetFrequence(1000);  Test time at 1/1000'th of Second.     

:Timer_Init
%ͻ
%                           Procedure Timer_Init                            
%ͼ

 PROTOTYPE :
 Procedure Timer_Init(Freq:Real);

 UNIT...: ~Unit MOS_ASM~
 IN.....: Freq (REAL) = New clock frequency in Hertz.                      
 OUT....: /                                                                
 EXPLAIN: Install internal Time_TestTimer.                                 
 NB.....: To return in normal frequency, set 0 in parameter.               

:Timer_Restore
%ͻ
%                          Procedure Timer_Restore                          
%ͼ

 PROTOTYPE :
 Procedure Timer_Restore;

 UNIT...: ~Unit MOS_ASM~
 IN.....: /                                                                
 OUT....: /                                                                
 EXPLAIN: Unload internal TimeHandler.                                     

:Set_LED
%ͻ
%                             Procedure Set_LED                             
%ͼ

 PROTOTYPE :
 Procedure Set_LED(Led:Byte; State:Boolean);

 UNIT...: ~Unit MOS_ASM~
 IN.....: Led   (BYTE) = N of the led to modify.                          
          State (BOOLEAN) = State wanted : True = ON, False = Off.         
 OUT....: /                                                                
 EXPLAIN: Modify the states of the 3 Leds of the keyboard (On or Off).     
 NB.....: You can use this constants for Led :                             
          LED_SCROLL = 16;                           Bit Scroll-Lock       
          LED_NUM    = 32;                           Bit Num-Lock          
          LED_CAPS   = 64;                           Bit Caps-Lock         
          KEY_INS    = 128;                          Bit Insert            
 SEE ALSO..: 
    ~Test_LED~

:Test_LED
%ͻ
%                             Function Test_LED                             
%ͼ

 PROTOTYPE :
 Function Test_LED(Led:Byte):Boolean;

 UNIT...: ~Unit MOS_ASM~
 IN.....: Led   (BYTE) = N of the led to get information.                 
 OUT....: (BOOLEAN) = State of the led.                                    
 EXPLAIN: Test the state of the 3 keyboard LEDs (On or Off).               
 NB.....: You can use this constants for Led :                             
          LED_SCROLL = 16;                           Bit Scroll-Lock       
          LED_NUM    = 32;                           Bit Num-Lock          
          LED_CAPS   = 64;                           Bit Caps-Lock         
          KEY_INS    = 128;                          Bit Insert            
 SEE ALSO..: 
    ~Set_LED~

:Test_Win
%ͻ
%                             Function Test_Win                             
%ͼ

 PROTOTYPE :
 Function Test_Win:Boolean;

 UNIT...: ~Unit MOS_ASM~
 IN.....: /                                                                
 OUT....: (BOOLEAN) = True if Windows is present.                          
 EXPLAIN: Test if Windows is present in memory.                            

:Test_OS2
%ͻ
%                             Function Test_OS2                             
%ͼ

 PROTOTYPE :
 Function Test_OS2:Boolean;

 UNIT...: ~Unit MOS_ASM~
 IN.....: /                                                                
 OUT....: (BOOLEAN) = True if OS2 is present.                              
 EXPLAIN: Test if OS2 is present in memory.                                

:Test_Share
%ͻ
%                            Function Test_Share                            
%ͼ

 PROTOTYPE :
 Function Test_Share:Boolean;

 UNIT...: ~Unit MOS_ASM~
 IN.....: /                                                                
 OUT....: (BOOLEAN) = True if "Share" is loaded.                           
 EXPLAIN: Test if the software Share is loaded in memory.                  

:Test_TP
%ͻ
%                             Function Test_TP                              
%ͼ

 PROTOTYPE :
 Function Test_TP:Boolean;

 UNIT...: ~Unit MOS_ASM~
 IN.....: /                                                                
 OUT....: (BOOLEAN) = TRUE = program found in memory.                      
 EXPLAIN: Test if the Turbo Pascal program is in memory.                   

:Test_BP
%ͻ
%                             Function Test_BP                              
%ͼ

 PROTOTYPE :
 Function Test_BP:Boolean;

 UNIT...: ~Unit MOS_ASM~
 IN.....: /                                                                
 OUT....: (BOOLEAN) = TRUE = program found in memory.                      
 EXPLAIN: Test if the Borland Pascal program is in memory.                 

:Test_TPX
%ͻ
%                             Function Test_TPX                             
%ͼ

 PROTOTYPE :
 Function Test_TPX:Boolean;

 UNIT...: ~Unit MOS_ASM~
 IN.....: /                                                                
 OUT....: (BOOLEAN) = TRUE = program found in memory.                      
 EXPLAIN: Test if the Turbo Pascal XMS program is in memory.               

:Test_CDRom
%ͻ
%                            Function Test_CDRom                            
%ͼ

 PROTOTYPE :
 Function Test_CDRom(Drv:Char):Boolean;

 UNIT...: ~Unit MOS_ASM~
 IN.....: Drv (CHAR) = Letter of the drive to test                         
 OUT....: (BOOLEAN) = True if Drv is a CDROM drive, else return False      
 EXPLAIN: Test if a drive is a CD-ROM.                                     
 NB.....: I have never test it with 2 Cdrom, but i think it will work.     

:Onglet
%ͻ
%                             Procedure Onglet                              
%ͼ

 PROTOTYPE :
 Procedure Onglet(X1,Y1,X2,Y2,No,COa,COi:Integer; Id:Word; Var O:TOnglet; Cin
           :String);

 UNIT...: ~Unit MOS_OCG~
 IN.....: X1,Y1,X2,Y2 (INTEGER) = Box coordinates.                         
          No (INTEGER) = First selected Onglet.                            
          Coa, Coi (INTEGER) = Onglets colors.                             
          Id (WORD) = Bits to parameter Onglets :                          
             Bit 0  $0001 = Freezed            Freezed Onglet              
             Bit 1  $0002 = Invisible Onglet   Invisible Onglet            
             Bit 2  $0004 = Hand Pointer       Hand Mouse Pointer on title 
          O (TOnglets) = Pointer to an Onglet structure.                   
          Cin (STRING) = Onglet Title.                                     
 OUT....: /                                                                
 EXPLAIN: Build and display an Onglet Gadget.                              

:Onglet_Draw
%ͻ
%                           Procedure Onglet_Draw                           
%ͼ

 PROTOTYPE :
 Procedure Onglet_Draw(O:TOnglet);

 UNIT...: ~Unit MOS_OCG~
 IN.....: O (TOnglets) = Pointer to an Onglet structure.                   
 OUT....: /                                                                
 EXPLAIN: Display Onglets.                                                 
 EXAMPLE: Onglet_Draw(Ong1);                                               

:Onglet_Freeze
%ͻ
%                          Procedure Onglet_Freeze                          
%ͼ

 PROTOTYPE :
 Procedure Onglet_Freeze(Status:Boolean; Var O:TOnglet);

 UNIT...: ~Unit MOS_OCG~
 IN.....: Status (BOOLEAN) = TRUE = Freeze Onglet.                         
          O (TOnglets) = Pointer to an Onglet structure.                   
 OUT....: /                                                                
 EXPLAIN: Freeze or UnFreeze the specified Onglet.                         
 EXAMPLE: Onglet_Freeze(On,Ong1);                                          

:Onglet_GetMsg
%ͻ
%                          Function Onglet_GetMsg                           
%ͼ

 PROTOTYPE :
 Function Onglet_GetMsg(Var O:TOnglet; M:Byte):Boolean;

 UNIT...: ~Unit MOS_OCG~
 IN.....: O (TOnglets) = Pointer to an Onglet structure.                   
          M (BYTE) = Mouse Button to activate Onglets.                     
 OUT....: (BOOLEAN) = TRUE if Onglet has been activated.                   
 EXPLAIN: Manage Onglets.                                                  
 EXAMPLE: If Onglet_GetMsg(Ong1,1)=TRUE Then ...                           


:Test_BMP
%ͻ
%                             Function Test_BMP                             
%ͼ

 PROTOTYPE :
 Function Test_BMP(FN:String):Boolean;

 UNIT...: ~Unit MOS_BMP~
 IN.....: FN : (STRING) = Path + Name of the file to test                  
 OUT....: (BOOLEAN) = TRUE if file is a Bmp else return FALSE.             
 EXPLAIN: Is the file a bmp ??                                             
          If file not found, return FALSE.                                 

:Test_MGF
%ͻ
%                             Function Test_MGF                             
%ͼ

 PROTOTYPE :
 Function Test_MGF(NameFile:string):Boolean;

 UNIT...: ~Unit MOS_BMP~
 IN.....: NameFile : (STRING) = Path + Name of the file to test            
 OUT....: (BOOLEAN) = TRUE if file is a Mgf file else return FALSE.        
                      An MGF file is a Bmp file with the 16 first colors   
                      ignored.                                             
 EXPLAIN: Is the file a mgf ??                                             
          If file not found, return FALSE.                                 

:Show_BMP
%ͻ
%                            Procedure Show_BMP                             
%ͼ

 PROTOTYPE :
 Procedure Show_BMP(x1,y1,x2,y2,OffsetX,OffsetY:Integer;Namefile:string;
           BmpFlags:Word);

 UNIT...: ~Unit MOS_BMP~
 IN.....: X1,Y1,X2,Y2 : (INTEGER) = Box where the picture will be          
                                    displayed.                             
          OffsetX,OffsetY : (INTEGER) = Offset or shift of the picture.    
              The picture will be displayed on x1,y1, but at this place,   
              the pixel shown is (offsetx,offsety) from the bmp file.      
              This 2 parameters are use only if we are in mozaic, centered 
              or viewer mode.                                              
          Namefile : (STRING) = Path + Name of the bmp file.               
          BmpFlags : (WORD) =                                              
       Bit  Num                                                            
        0   0001  Viewer mode (Else MGF Mode).                             
        1   0002  Make a wait at the end                                   
        2   0004  Mozaic                                                   
        3   0008  Centered                                                 
        4   0010  Load bmp palette of the bmp of 0..255                    
        5   0020  Load bmp palette of the bmp of 16..255                   
        6   0040  In viewer mode, don't save screen.                       
        7   0080  Show in a window (Mse_Hide + Win_Clip )                  
 OUT....: /                                                                
 EXPLAIN: This procedure show a picture or photo from a BMP or MGF file.   
 BUGS...: Show only 16 and 256 colors pictures.                            
          x1..y2 and BmpFlags are use only if it's 256 colors BMP files.   
          To display BMP in background of screen, use MGF mode.            
 SEE ALSO..: 
    ~Test_BMP~
    ~Test_MGF~
    ~Get_BMPInfo~

:ReadKey
%ͻ
%                             Function ReadKey                              
%ͼ

 PROTOTYPE :
 Function ReadKey: Char;

 UNIT...: ~Unit MOS_CRT~
 IN.....: /                                                                
 OUT....: (CHAR)                                                           
 EXPLAIN: Reads a character from the keyboard.                             
 CF.....: Tp7 CRT Unit.                                                    

:WhereX
%ͻ
%                              Function WhereX                              
%ͼ

 PROTOTYPE :
 Function WhereX: Byte;

 UNIT...: ~Unit MOS_CRT~
 IN.....: /                                                                
 OUT....: (BYTE)                                                           
 EXPLAIN: Returns the CP's X coordinate of the current cursor location.    
 CF.....: Tp7 CRT Unit.                                                    

:WhereY
%ͻ
%                              Function WhereY                              
%ͼ

 PROTOTYPE :
 Function WhereY: Byte;

 UNIT...: ~Unit MOS_CRT~
 IN.....: /                                                                
 OUT....: (BYTE)                                                           
 EXPLAIN: Returns the CP's Y coordinate of the current cursor location.    
 CF.....: Tp7 CRT Unit.                                                    

:Window
%ͻ
%                             Procedure Window                              
%ͼ

 PROTOTYPE :
 Procedure Window(X1, Y1, X2, Y2 : byte);

 UNIT...: ~Unit MOS_CRT~
 IN.....: X1,Y1,X2,Y2 (BYTE)                                               
 OUT....: /                                                                
 EXPLAIN: Defines a text window on the screen.                                                                 
 CF.....: Tp7 CRT Unit.                                                    

:TextBackground
%ͻ
%                         Procedure TextBackground                          
%ͼ

 PROTOTYPE :
 Procedure TextBackground(Color : Byte);

 UNIT...: ~Unit MOS_CRT~
 IN.....: /                                                                
 OUT....: /                                                                
 EXPLAIN: Selects the background color.                                    
 CF.....: Tp7 CRT Unit.                                                    

:TextColor
%ͻ
%                            Procedure TextColor                            
%ͼ

 PROTOTYPE :
 Procedure TextColor(Color : Byte);

 UNIT...: ~Unit MOS_CRT~
 IN.....: /                                                                
 OUT....: /                                                                
 EXPLAIN: Selects the foreground character color.                          
 CF.....: Tp7 CRT Unit.                                                    

:TextMode
%ͻ
%                            Procedure TextMode                             
%ͼ

 PROTOTYPE :
 Procedure TextMode (Mode : Byte);

 UNIT...: ~Unit MOS_CRT~
 IN.....: Mode (BYTE) = Mode number                                        
 OUT....: /                                                                
 EXPLAIN: Selects a specific text mode.                                    
 CF.....: Tp7 CRT Unit.                                                    

:NormVideo
%ͻ
%                            Procedure NormVideo                            
%ͼ

 PROTOTYPE :
 Procedure NormVideo;

 UNIT...: ~Unit MOS_CRT~
 IN.....: /                                                                
 OUT....: /                                                                
 EXPLAIN: Selects the original text attribute read from the cursor location
          at startup.                                                      
 CF.....: Tp7 CRT Unit.                                                    

:Sound
%ͻ
%                              Procedure Sound                              
%ͼ

 PROTOTYPE :
 Procedure Sound(Hz: Word);

 UNIT...: ~Unit MOS_CRT~
 IN.....: Hz (WORD) = specifies the frequency of the emitted sound in hertz
 OUT....: /                                                                
 EXPLAIN: Starts the internal speaker.The speaker                          
          continues until explicitly turned off by a call to NoSound.      
 CF.....: Tp7 CRT Unit.                                                    

:NoSound
%ͻ
%                             Procedure NoSound                             
%ͼ

 PROTOTYPE :
 Procedure NoSound;

 UNIT...: ~Unit MOS_CRT~
 IN.....: /                                                                
 OUT....: /                                                                
 EXPLAIN: Turns off the computer's internal speaker.                       
 CF.....: Tp7 CRT Unit.                                                    


:Req_XCopy
%ͻ
%                            Procedure Req_XCopy                            
%ͼ

 PROTOTYPE :
 Procedure Req_XCopy(Px,Py:Integer; Id:Word; Title,Source,Target:String);

 UNIT...: ~Unit MOS_DIR~
 IN.....: Px,Py (INTEGER) = X,Y coordinates for the requester.             
          Id (WORD) = Options bits : (None)                                
          Title (STRING) = Title requester.                                
          Source (STRING) = Source directory to copy.                      
          Target (STRING) = Target directory.                              
          Name (STRING) : Name of the file to change the attributes.       
 OUT....: /                                                                
 EXPLAIN: Call a XCopy Requester and copy recursively a source directory   
          to a target directory.                                           
 EXAMPLE: Req_XCopy(100,50,$0000,'COPYING...','C:\DOS','D:\DOSBACK');      

:Req_Attrib
%ͻ
%                           Procedure Req_Attrib                            
%ͼ

 PROTOTYPE :
 Procedure Req_Attrib(X,Y:Integer;Name:String);

 UNIT...: ~Unit MOS_DIR~
 IN.....: X,Y (INTEGER) : X,Y coordinates of the window.                   
          Name (STRING) : Name of the file to change the attributes.       
 OUT....: /                                                                
 EXPLAIN: Edit and modify the attributes buts of the file "Name".          
 EXAMPLE: Req_Attrib(50,30,'C:\CONFIG.SYS');                               

:Req_FileManager
%ͻ
%                         Procedure Req_FileManager                         
%ͼ

 PROTOTYPE :
 Procedure Req_FileManager(X1,Y1,Sv:Integer; Name,OkBut,Mask:String; Style:
           Byte;Var DirSel,FilSel:String; Var Size:LongInt);

 UNIT...: ~Unit MOS_DIR~
 IN.....: X,Y (INTEGER) : X,Y coordinates of the window.                   
          Sv  (INTEGER) : Vertical size of the window.                     
          Name (STRING) : Title of the window.                             
          OkBut(STRING) : Name for the 'OK' gadget.                        
          Mask (STRING) : File ask for the directory.                      
          Style  (BYTE) : Type of requester .                              
                    0      All uses (Select a file only)                   
                    1      Select a directory only                         
                    2      Delete file(s)                                  
                    3      Rename file(s)                                  
                    4      Change attributes of file(s)                    
                    5      Viewer of pictures                              
                    6      Playing of sounds.                              
          DirSel (STRING) : Directory were begin the search. ('' if none)  
          FilSel (STRING) : First file purposed. ('' if none)              
 OUT....: DirSel (STRING) : Directory selected.                            
          FilSel (STRING) : File Selected.                                 
          Size (LONGINT)  : Size of the selected file.                     
 EXPLAIN: Display and manage a requester of type "File requester'          
          Return the nae of file selected, else a '' string if canceled    
 EXAMPLE: Req_FileManager(9,30,280,'LOAD','_OK','*.*',0,DirSel,FilSel,Size)

:Menu_Clear
%ͻ
%                           Procedure Menu_Clear                            
%ͼ

 PROTOTYPE :
 Procedure Menu_Clear(Var M:TMenu);

 UNIT...: ~Unit MOS_MEN~
 IN.....: /                                                                
 OUT....: /                                                                
 EXPLAIN: Clear all the arrays menu before their initialisation.           
 SEE ALSO..: 
    ~Menu_SetId~
    ~Menu_Test~
    ~Menu_Add~
    ~Menu_TestCheckPoint~

:Menu_Add
%ͻ
%                            Procedure Menu_Add                             
%ͼ

 PROTOTYPE :
 Procedure Menu_Add(Var M:TMenu; MX,MY:Integer; Lab:String);

 UNIT...: ~Unit MOS_MEN~
 IN.....: Menu (TMENU) = Pointer to the structure menu.                    
          MX,MY (INTEGER) = Menu and menu point number.                    
          Lab (STRING) = Menu label (with his definition bits).            
 OUT....: /                                                                
 EXPLAIN: Add a new menu point in menu.                                    
 NB.....: Maximum 10 menus, 15 menus points and 33 chars for each point.   
 EXAMPLE: Menu_Clear(M);                                                   
          M.TbMen[1,1]:='00 _PREFERENCES';       Menu 1 title              
          M.TbMen[1,2]:='00 _LOAD PREFS';        Normal point              
          M.TbMen[1,3]:='02';                    Separation bar            
          M.TbMen[1,4]:='04 POINT _CHECK 1';     Check point untagged      
          M.TbMen[1,5]:='1C POINT C_HECK 2';     Check point tagged        
          M.TbMen[2,1]:='02 POINTS _EXCLUSIFS'   Menu 2 title + Exclusif   
          M.TbMen[2,2]:='0C E_XCLUSIF 1';        Check point tagged        
          M.TbMen[2,3]:='04 EX_CLUSIF 2';        Check point untagged      
          Init_Menu(M);                                                    
 SEE ALSO..: 
    ~Menu_SetId~
    ~Menu_Test~
    ~Menu_Add~
    ~Menu_TestCheckPoint~

:Menu_Test
%ͻ
%                            Procedure Menu_Test                            
%ͼ

 PROTOTYPE :
 Procedure Menu_Test(Var M:TMenu; CB,CP:Byte; Var MS,PS,SS:Byte);

 UNIT...: ~Unit MOS_MEN~
 IN.....: CB,CP (BYTE) = Color pen and background for menu.                
 OUT....: MS,PS,SS (BYTE) Var = Menu number and selected menu point.       
 EXPLAIN: Manage a menu.                                                   
 EXAMPLE: Menu_Test(7,0,MS,PS,SS);                                         
          Case MS of                                                       
            1: Case PS of                      ; Menu 1                    
                 1:                            ; Menu point 1,1            
                 2:                            ; Menu point 1,2            
                 End;                                                      
            2:                                                             
            3:                                                             
            End;                                                           
 SEE ALSO..: 
    ~Menu_SetId~
    ~Menu_Clear~
    ~Menu_Add~
    ~Menu_TestCheckPoint~

:Menu_TestCheckPoint
%ͻ
%                       Function Menu_TestCheckPoint                        
%ͼ

 PROTOTYPE :
 Function Menu_TestCheckPoint(M:TMenu; MS,PS:Byte):Boolean;

 UNIT...: ~Unit MOS_MEN~
 IN.....: MS,PS (BYTE) = Menu and menu point number.                       
 OUT....: (BOOLEAN) = TRUE : The menu point is tagged.                     
 EXPLAIN: Test a menu point declared as "check" and return TRUE if tagged. 
 SEE ALSO..: 
    ~Menu_SetId~
    ~Menu_Test~
    ~Menu_Add~
    ~Menu_Clear~

:Menu_SetId
%ͻ
%                           Procedure Menu_SetId                            
%ͼ

 PROTOTYPE :
 Procedure Menu_SetId(Var M:TMenu;MS,PS:Byte; Id:Byte);

 UNIT...: ~Unit MOS_MEN~
 IN.....: MS,PS (BYTE) = Menu and menu point number to modify.             
          Id (BYTE) = New value for Id.                                    
 OUT....: /                                                                
 EXPLAIN: Modify the Id value of a menu point.                             
 SEE ALSO..: 
    ~Menu_TestCheckPoint~
    ~Menu_Test~
    ~Menu_Add~
    ~Menu_Clear~

:Req_Dialog
%ͻ
%                           Procedure Req_Dialog                            
%ͼ

 PROTOTYPE :
 Procedure Req_Dialog(Name,TXT,GAD:String; Var NUM:Integer);

 UNIT...: ~Unit MOS_EZR~
 IN.....: Name (STRING) = Window name.                                     
          Txt (STRING) = Text to display in requester.                     
          Gad (STRING) = Buttons and text buttons.                         
          Num (INTEGER) = Icon number to display :                         
                1 = Warning icon                                           
                2 = Stop icon                                              
                3 = Question icon                                          
                4 = Information icon                                       
                5 = Bomb icon                                              
                6 = Novell icon                                            
 OUT....: Num (INTEGER) = Number of the selected Button.                   
                  0    = Close requester Button                            
                  1..n = Users defined buttons                             
 EXPLAIN: Manage an EZ_Requester.                                          
          It's a common dialog requester that able you to select           
          a predicate by pressing a Button.                                
 EXAMPLE: Nam:='EZ REQUEST';                                               
          Txt:='Ok for the|gadget test';                                   
          Gad:='Ok|Cancel|Restore|';                                       
          EZ_RequestG(Nam,Txt,Gad,Num);                                    
 NB.....: Texts and buttons texts must be separated by '|'.                
          Maximum 10 buttons available for this Requester.                 

:Req_String
%ͻ
%                           Procedure Req_String                            
%ͼ

 PROTOTYPE :
 Procedure Req_String(Name,TXT,GAD:String; NbCar,Size:Integer; Var Cin:String
           ; Var NUM:Integer);

 UNIT...: ~Unit MOS_EZR~
 IN.....: Name (STRING) = Window name.                                     
          Txt (STRING) = Text to display in requester.                     
          Gad (STRING) = Buttons and text buttons.                         
          NbCar (INTEGER) = Maximum caracters to input.                    
          Size (INTEGER) = Horizontal size in pixel for the input box.     
          Cin (STRING) = String Input / Ouput.                             
             If the first caracter is a $, then the requester is in        
             password mode (No caracters displayed).                       
          Num (INTEGER) = Icon number to display :                         
                1 = Warning icon                                           
                2 = Stop icon                                              
                3 = Question icon                                          
                4 = Information icon                                       
                5 = Bomb icon                                              
                6 = Novell icon                                            
 OUT....: Num (INTEGER) = Number of the selected Button.                   
                  0    = Close requester Button                            
                  1..n = Users defined buttons                             
          Cin (STRING) = String Input / Ouput.                             
 EXPLAIN: Manage a "String_Requester".                                     
          Enable user to input a string (or a password).                   
 EXAMPLE: Name:='STRING REQUEST';                                          
          Txt:='Please input a password||keys will not be displayed';      
          Gad:='Ok|Hold|Cancel';                                           
          Req_String(Name,Txt,Gad,40,120,Cin,Num);                         
 NB.....: Texts and buttons texts must be separated by '|'.                
          Maximum 10 buttons available for this Requester.                 

:Req_Value
%ͻ
%                            Procedure Req_Value                            
%ͼ

 PROTOTYPE :
 Procedure Req_Value(Name,TXT,GAD:String; BMin,BMax:Longint; Var Vai:Longint;
            Var NUM:Integer);

 UNIT...: ~Unit MOS_EZR~
 IN.....: Name (STRING) = Window name.                                     
          Txt (STRING) = Text to display in requester.                     
          Gad (STRING) = Buttons and text buttons.                         
          BMin (LONGINT)= Minimal value available.                         
          BMax (LONGINT)= Maximal value available.                         
          Vai (LONGINT) = Icon number to display.                          
          Num (INTEGER) = Icon number to display :                         
                1 = Warning icon                                           
                2 = Stop icon                                              
                3 = Question icon                                          
                4 = Information icon                                       
                5 = Bomb icon                                              
                6 = Novell icon                                            
 OUT....: Vai (LONGINT) = Value (Modified).                                
          Num (INTEGER) = Number of the selected Button.                   
                  0    = Close requester Button                            
                  1..n = Users defined buttons                             
 EXPLAIN: Manage a "Value_Requester".                                      
          Enable user to input a value (only numbers allowed).             
 EXAMPLE: Name:='VALUE REQUEST';                                           
          Txt:='Please input a value|Range is -10 +10';                    
          Gad:='Ok|Retry|Cancel|';                                         
          Req_Value(Name,Txt,Gad,-10,+10,Vai,Num);                         
 NB.....: Texts and buttons texts must be separated by '|'.                
          Maximum 10 buttons available for this Requester.                 

:Req_List
%ͻ
%                             Function Req_List                             
%ͼ

 PROTOTYPE :
 Function Req_List(Px,Py,Id:Integer; Name,Title:String; Sep:Char; List:String
          ):Longint;

 UNIT...: ~Unit MOS_EZR~
 IN.....: Px,Py (INTEGER) = Requester position.                            
          Id (WORD) = Bits configuration.                                  
              Bit 0  $0001 : 1 = Put requester in the screen center.       
              Bit 1  $0002 : 1 = Maximise window size for full list.       
          Name (STRING) = Title requester.                                 
          Title (STRING) = List title.                                     
          Sep (CHAR) = List separator.                                     
          List (TList) = Path and list filename.                           
 OUT....: (LONGINT) = Position in list of the selected item.               
 EXPLAIN: Display a list in a windows. List is loaded from a list file.    

:Play_FLI
%ͻ
%                            Procedure Play_FLI                             
%ͼ

 PROTOTYPE :
 Procedure Play_FLI(FileName:String);

 UNIT...: ~Unit MOS_FLI~
 IN.....: FileName (STRING) = Path + Name of a FLI file to play            
 OUT....: /                                                                
 EXPLAIN: This procedure show on full screen an FLI animation.             
 BUGS...: This procedure don't test before if it's an FLI file.            

:Test_FLI
%ͻ
%                             Function Test_FLI                             
%ͼ

 PROTOTYPE :
 Function Test_FLI(S:String) : Boolean;

 UNIT...: ~Unit MOS_FLI~
 IN.....: S (STRING) = Path + Name of a FLI file to test                   
 OUT....: (BOOLEAN) TRUE if it's an FLI animation, else FALSE.             
 EXPLAIN: This function test if the file is an FLI animation               
          (Autodesk Animation File)                                        

:Save_Screen
%ͻ
%                           Procedure Save_Screen                           
%ͼ

 PROTOTYPE :
 Procedure Save_Screen(What_to_save:Word);

 UNIT...: ~Unit MOS_GFX~
 IN.....: What_to_save (Word) = Bit Mask                                   
          Bit  Num    Save or make if this bit is on : ...                 
           0   0001   Save Video Mode                                      
           1   0002   Color palette                                        
           2   0004   The picture of the screen                            
           3   0008   Mouse pointer                                        
           4   0010   Mouse coordinates                                    
           5   0020   Mouse speed                                          
           6   0040   Make a Mse_Show                                      
           7   0080   Make a Mse_Hide after the save_screen                
           8   0100   VESA_SetViewPort parameters saved                    
           9   0200                                                        
           10  0400                                                        
           11  0800                                                        
           12  1000                                                        
           13  2000                                                        
           14  4000                                                        
           15  8000                                                        
 OUT....: /                                                                
 EXPLAIN: This procedure save a picture, his video mode and when you will  
          call RESTORE_SCREEN, all will be put on the initial state.       
          This procedure save only what you want to save in the var        
          What_to_save.                                                    
 SEE ALSO..: 
    ~Restore_Screen~

:Restore_Screen
%ͻ
%                         Procedure Restore_Screen                          
%ͼ

 PROTOTYPE :
 Procedure Restore_Screen;

 UNIT...: ~Unit MOS_GFX~
 IN.....: /                                                                
 OUT....: /                                                                
 EXPLAIN: This procedure restore the picture of screen, video like the     
          call of save_screen has define the parameters.                   
 SEE ALSO..: 
    ~Save_Screen~

:Test_Icon
%ͻ
%                            Function Test_Icon                             
%ͼ

 PROTOTYPE :
 Function Test_Icon(S:String):Boolean;

 UNIT...: ~Unit MOS_GFX~
 IN.....: S (STRING) = Path + Name of the icon file to test                
 OUT....: (BOOLEAN) = TRUE if it's a windows icon file (readable by MOS)   
                      FALSE if the file is not an icon file.               
 EXPLAIN: Answer the question : Is this file an icon file ?                
 OPT....: File_TestHeader                                                  
 SEE ALSO..: 
    ~Show_Icon~

:Show_Icon
%ͻ
%                            Procedure Show_Icon                            
%ͼ

 PROTOTYPE :
 Procedure Show_Icon(Wx,Wy:Word; S:String);

 UNIT...: ~Unit MOS_GFX~
 IN.....: WX,WY (INTEGER) = Coordinates where to draw the Icon             
          S (STRING) = Path + Name of the icon file.                       
 OUT....: /                                                                
 EXPLAIN: Draw an icon at WX,WY coordinates. It is 32*32 pixel icons.      
          The icons files are the same like windows (.ICO)                 
 BUGS...: 1) This procedure don't load the icon palette. And the palette  
              of MOS is different of the icon palette..                    
          2) This procedure don't verify if S is an icon file...          
          3) Transparency not good                                        
 SEE ALSO..: 
    ~Test_Icon~

:Show_Butterfly
%ͻ
%                         Procedure Show_Butterfly                          
%ͼ

 PROTOTYPE :
 Procedure Show_Butterfly(X,Y,Col:Integer);

 UNIT...: ~Unit MOS_GFX~
 IN.....: X,Y (INTEGER) = Coordinates where to draw the animation          
          Col (INTEGER) = Background color                                 
 OUT....: /                                                                
 EXPLAIN: Draw an animation (a butterfly) on a part of screen.             
          This animation is a succession of 3 icons.                       

:Test_GIF
%ͻ
%                             Function Test_GIF                             
%ͼ

 PROTOTYPE :
 Function Test_GIF(NameFile:String):Boolean;

 UNIT...: ~Unit MOS_GFX~
 IN.....: NameFile (STRING) = Path + Name of the file to test.             
 OUT....: (BOOLEAN) = TRUE : if it's a GIF picture, else FALSE.            
 EXPLAIN: Answer the question : Is this file a GIF picture ?               
 SEE ALSO..: 
    ~Get_GIFInfo~

:Show_GFX
%ͻ
%                            Procedure Show_GFX                             
%ͼ

 PROTOTYPE :
 Procedure Show_GFX(S:String; Imgflag:Byte);

 UNIT...: ~Unit MOS_GFX~
 IN.....: S (STRING) = Path + Name of a file.                              
          ImgFlag (BYTE)                                                   
          Bit 1 = Wait                                                     
              2 = Save_Img                                                 
 EXPLAIN: This procedure launch PV to view a file (Pictures...)            
 SEE ALSO..: 
    ~Show_BMP~

:VESA_Putpixel256
%ͻ
%                        Procedure VESA_Putpixel256                         
%ͼ

 PROTOTYPE :
 Procedure VESA_Putpixel256(x,y:Integer;c:byte);

 UNIT...: ~Unit MOS_GPH~
 IN.....: (X,Y) : (INTEGER) = Coordinates of the pixel.                    
          C : (BYTE) = Color of the pixel to put on screen.                
 OUT....: /                                                                
 EXPLAIN: Show a pixel on screen. (Only 256 color modes                    
          Important, this procedure don't test setviewport and if x,y are  
          out of the screen, bugs will appear.                             

:VESA_Putpixel
%ͻ
%                          Procedure VESA_Putpixel                          
%ͼ

 PROTOTYPE :
 Procedure VESA_Putpixel(x,y:Integer;c:Longint);

 UNIT...: ~Unit MOS_GPH~
 IN.....: (X,Y) : (INTEGER) = Coordinates of the pixel.                    
          C : (BYTE) = Color of the pixel to put on screen.                
 OUT....: /                                                                
 EXPLAIN: Show a pixel on screen.                                          

:VESA_Getpixel
%ͻ
%                          Function VESA_Getpixel                           
%ͼ

 PROTOTYPE :
 Function VESA_Getpixel(x,y:Integer):Word;

 UNIT...: ~Unit MOS_GPH~
 IN.....: (X,Y) : (INTEGER) = Coordinates of the pixel.                    
 OUT....: (WORD) = Color of the pixel on screen.                           
 EXPLAIN: Get the color of a pixel.                                        
 NB.....: If the pixel is out of screen, or setviewport, default color will
          be returned.                                                     
 SEE ALSO..: 
    ~VESA_GetColor~

:VESA_OutTextXY
%ͻ
%                         Procedure VESA_OutTextXY                          
%ͼ

 PROTOTYPE :
 Procedure VESA_OutTextXY(x,y:Integer;S:String);

 UNIT...: ~Unit MOS_GPH~
 IN.....: (X,Y) = (INTEGER) : Coordinates where s must be written.         
          S = (STRING) : String to writte.                                 
 OUT....: /                                                                
 EXPLAIN: Write a text at (x,y).                                           
 CF.....: Tp7 Graph Unit.                                                  

:VESA_TextWidth
%ͻ
%                          Function VESA_TextWidth                          
%ͼ

 PROTOTYPE :
 Function VESA_TextWidth(S : string) : word;

 UNIT...: ~Unit MOS_GPH~
 IN.....: s = (STRING) : String witch we want to know the size in pixels.  
 OUT....: (WORD) : Size in pixel of the string on the screen.              
 EXPLAIN: Calculate the length in pixel of a string.                       
 CF.....: Tp7 Graph Unit.                                                  

:VESA_TextHeight
%ͻ
%                         Function VESA_TextHeight                          
%ͼ

 PROTOTYPE :
 Function VESA_TextHeight(S : string) : word;

 UNIT...: ~Unit MOS_GPH~
 IN.....: s = (STRING) : String witch we want to know the height in pixels.
 OUT....: (WORD) : Size in pixel of the string on screen.                  
 EXPLAIN: Calculate the height in pixel of a string.                       
 CF.....: Tp7 Graph Unit.                                                  

:VESA_SetTextStyle
%ͻ
%                        Procedure VESA_SetTextStyle                        
%ͼ

 PROTOTYPE :
 Procedure VESA_SetTextStyle(FileName:String;Dir,Size:Byte);

 UNIT...: ~Unit MOS_GPH~
 IN.....: FileName : (STRING) = File Name of a CHR font.                   
          Dir : (BYTE) = Direction of display  (0=Horizontal               
                                                and 1=Vertical).           
          Size : (BYTE) = Size of the font.                                
 OUT....: /                                                                
 EXPLAIN: You can change the current font or size or direction.            
          Only one difference between tp7 graph unit : The first parameter 
          is a NameFile instead of an integer.                             
 CF.....: Tp7 Graph Unit.                                                  

:VESA_Initgraph
%ͻ
%                         Procedure VESA_Initgraph                          
%ͼ

 PROTOTYPE :
 Procedure VESA_Initgraph(Mode:Byte;Path:String);

 UNIT...: ~Unit MOS_GPH~
 IN.....: Mode (BYTE) = Video mode (C.f. Array Explain)                    
          Path (STRING) = Path where to found CHR font file.               
 OUT....: /                                                                
 EXPLAIN: Initilise the VESA video mode, all the variables ...             
          Video mode                                                       
           0  : 320*200     16c                                            
           1  : 640*350     16c                                            
           2  : 640*480     16c                                            
           3  : 800*600     16c                                            
           4  : 1024*768    16c                                            
           5  : 1280*1024   16c                                            
           10 : 320*200    256c                                            
           11 : 640*400    256c                                            
           12 : 640*480    256c                                            
           13 : 800*600    256c                                            
           14 : 1024*768   256c                                            
           15 : 1280*1024  256c                                            
           20 : 320*200     64k                                            
           21 : 640*480     64k                                            
           22 : 800*600     64k                                            
           23 : 1024*768    64k                                            
           24 : 1280*1024   64k                                            
           30 : 320*200     16M                                            
           31 : 640*480     16M                                            
           32 : 800*600     16M                                            
           33 : 1024*768    16M                                            
           34 : 1280*1024   16M                                            

:VESA_ReInitgraph
%ͻ
%                        Procedure VESA_ReInitgraph                         
%ͼ

 PROTOTYPE :
 Procedure VESA_ReInitgraph(Mode:Byte;Path:String);

 UNIT...: ~Unit MOS_GPH~
 IN.....: Mode (BYTE) = Video mode (C.f. VESA_InitGraph)                   
          Path (STRING) = Path where to found CHR font file.               
 OUT....: /                                                                
 EXPLAIN: Reinitilisation of the internal variable like VESA_Initgraph but 
          don't init video mode (So it don't clear the screen)             
 SEE ALSO..: 
    ~VESA_Initgraph~

:VESA_CloseGraph
%ͻ
%                         Procedure VESA_CloseGraph                         
%ͼ

 PROTOTYPE :
 Procedure VESA_CloseGraph;

 UNIT...: ~Unit MOS_GPH~
 IN.....: /                                                                
 OUT....: /                                                                
 EXPLAIN: End the use of the Graphic mode. This procedure make a           
          TextMode(3);                                                     

:VESA_GetMaxX
%ͻ
%                           Function VESA_GetMaxX                           
%ͼ

 PROTOTYPE :
 Function VESA_GetMaxX : integer;

 UNIT...: ~Unit MOS_GPH~
 IN.....: /                                                                
 OUT....: (INTEGER) : Maximum coordinate X in actual graphic mode.         
 EXPLAIN: This return return 639 if we are in 640*480 mode for example.    

:VESA_GetMaxY
%ͻ
%                           Function VESA_GetMaxY                           
%ͼ

 PROTOTYPE :
 Function VESA_GetMaxY : integer;

 UNIT...: ~Unit MOS_GPH~
 IN.....: /                                                                
 OUT....: (INTEGER) : Maximum coordinate Y in actual graphic mode.         
 EXPLAIN: Return maximun Y coordinate in current mode.                     
 EXAMPLE: This function return 479 if we are in 640*480 mode.              

:VESA_SetColor
%ͻ
%                          Procedure VESA_SetColor                          
%ͼ

 PROTOTYPE :
 Procedure VESA_SetColor(Color : word);

 UNIT...: ~Unit MOS_GPH~
 IN.....: Color : (WORD) = Color to set                                    
 OUT....: /                                                                
 EXPLAIN: Set  the default color to use to draw.                           

:VESA_GetColor
%ͻ
%                          Function VESA_GetColor                           
%ͼ

 PROTOTYPE :
 Function VESA_GetColor : word;

 UNIT...: ~Unit MOS_GPH~
 IN.....: /                                                                
 OUT....: (WORD) = Get default color.                                      
 EXPLAIN: /                                                                

:VESA_GetLineStyle
%ͻ
%                        Procedure VESA_GetLineStyle                        
%ͼ

 PROTOTYPE :
 Procedure VESA_GetLineStyle(Var LineInfo : TLineSettingsType);

 UNIT...: ~Unit MOS_GPH~
 IN.....: /                                                                
 OUT....: LineInfo (TLINESETTINGSTYPE) = Get the LineStyle parameters.     
 EXPLAIN: Get the LineStyle parameters.                                    

:VESA_SetLineStyle
%ͻ
%                        Procedure VESA_SetLineStyle                        
%ͼ

 PROTOTYPE :
 Procedure VESA_SetLineStyle(LineStyle, Pattern, Thickness : Word);

 UNIT...: ~Unit MOS_GPH~
 IN.....: LineStyle (WORD) = a value from SolidLn to UserBitLn(0..4)       
          Pattern   (WORD) = is ignored unless LineStyle equals UserBitLn  
          Thickness (WORD) = NormWidth or ThickWidth                       
 OUT....: /                                                                
 EXPLAIN: Set the LineStyle parameters.                                    
 CF.....: Unit GRAPH from Tp7.                                             
 BUGS...: NOT CODED                                                        

:VESA_Line
%ͻ
%                            Procedure VESA_Line                            
%ͼ

 PROTOTYPE :
 Procedure VESA_Line(x1, y1, x2, y2 : integer);

 UNIT...: ~Unit MOS_GPH~
 IN.....: X1,Y1,X2,Y2 : (INTEGER) = Coordinates of the line                
 OUT....: /                                                                
 EXPLAIN: Draw a line on screen.                                           
 CF.....: Tp7 (GRAPH). No differences...                                   
 OPT....: Make a VESA_LINE_256  en 256c..                                  

:VESA_Rectangle
%ͻ
%                         Procedure VESA_Rectangle                          
%ͼ

 PROTOTYPE :
 Procedure VESA_Rectangle(x1, y1, x2, y2 : integer);

 UNIT...: ~Unit MOS_GPH~
 IN.....: X1,X2,Y1,Y2 : (INTEGER) = Coordinates of a rectangle.            
 OUT....: /                                                                
 EXPLAIN: Draw a rectangle with the current SetWriteMode                   
          No differences with GRAPH of Tp7.                                
 CF.....: Unit GRAPH.TPU From TP7.                                         

:VESA_Bar
%ͻ
%                            Procedure VESA_Bar                             
%ͼ

 PROTOTYPE :
 Procedure VESA_Bar(X1,Y1,X2,Y2 : Integer);

 UNIT...: ~Unit MOS_GPH~
 IN.....: X1,Y1,X2,Y2 : (INTEGER) = Coordinates of the box.                
 OUT....: /                                                                
 EXPLAIN: Draw a fill box on the screen.                                   
 CF.....: Tp7 (GRAPH). No differences...                                   

:VESA_GetX
%ͻ
%                            Function VESA_GetX                             
%ͼ

 PROTOTYPE :
 Function VESA_GetX : integer;

 UNIT...: ~Unit MOS_GPH~
 IN.....: /                                                                
 OUT....: (INTEGER) = Abscissa of the current position.                    
 EXPLAIN: Get the coordinate in X of the current position.                 
          No differences with GRAPH unit of Tp7.                           
 CF.....: Unit GRAPH.TPU From TP7.                                         

:VESA_GetY
%ͻ
%                            Function VESA_GetY                             
%ͼ

 PROTOTYPE :
 Function VESA_GetY : integer;

 UNIT...: ~Unit MOS_GPH~
 IN.....: /                                                                
 OUT....: (INTEGER) = Ordinate of the current position.                    
 EXPLAIN: Get the coordinate in Y of the current position.                 
          No difference with GRAPH unit of Tp7.                            
 CF.....: Unit GRAPH.TPU From TP7.                                         

:VESA_LineTo
%ͻ
%                           Procedure VESA_LineTo                           
%ͼ

 PROTOTYPE :
 Procedure VESA_LineTo(X, Y : integer);

 UNIT...: ~Unit MOS_GPH~
 IN.....: X,Y : (INTEGER) = Coordinates where the current position must    
                            move and draw the line moving.                 
 OUT....: /                                                                
 EXPLAIN: Draw a line from the current position to (X,Y).                  
          No difference with GRAPH from Tp7.                               
 CF.....: Unit GRAPH.TPU From TP7.                                         

:VESA_MoveTo
%ͻ
%                           Procedure VESA_MoveTo                           
%ͼ

 PROTOTYPE :
 Procedure VESA_MoveTo(X, Y : integer);

 UNIT...: ~Unit MOS_GPH~
 IN.....: X,Y : (INTEGER) = Coordinates of the current position to move    
 OUT....: /                                                                
 EXPLAIN: Move the current position.                                       
          No difference with GRAPH unit of Tp7.                            
 CF.....: Unit GRAPH.TPU From TP7.                                         

:VESA_ImageSize
%ͻ
%                          Function VESA_ImageSize                          
%ͼ

 PROTOTYPE :
 Function VESA_ImageSize(x1, y1, x2, y2 : integer) : word;

 UNIT...: ~Unit MOS_GPH~
 IN.....: X1,Y1,X2,Y2 (WORD) : Coordinates for the ImageSize.              
 OUT....: (WORD) = Size in bytes needed for the VESA_GetImage              
                   0 if size is > 64 Kb                                    
 EXPLAIN: Get how many bytes it's needed to make a VESA_GetImage           
 CF.....: Unit GRAPH from Tp7.                                             

:VESA_GetImage
%ͻ
%                          Procedure VESA_GetImage                          
%ͼ

 PROTOTYPE :
 Procedure VESA_GetImage(x1, y1, x2, y2 : integer; var BitMap);

 UNIT...: ~Unit MOS_GPH~
 IN.....: X1,Y1,X2,Y2 (WORD) : Coordinates for the 256 color getimage      
          BitMap (UNTYPED) : Will contain the height and width of image    
                             and the bit image from the screen             
 OUT....: /                                                                
 EXPLAIN: Save a part of screen to the memory.                             
 CF.....: Unit GRAPH from Tp7.                                             

:VESA_PutImage
%ͻ
%                          Procedure VESA_PutImage                          
%ͼ

 PROTOTYPE :
 Procedure VESA_PutImage(X, Y : integer; var BitMap; BitBlt : word);

 UNIT...: ~Unit MOS_GPH~
 IN.....: X,Y (WORD) : Coordinates where to put the image.                 
          BitMap (UNTYPED) : Contain the height and width of image and the 
                             bit image that will be put onto the screen    
          BitBlt (WORD) : specifies which binary operator will be used     
                          to put the bit image onto the screen.            
 OUT....: /                                                                
 EXPLAIN: Put on screen a stored image from memory.                        
 CF.....: Unit GRAPH from Tp7.                                             

:VESA_SetRGBPalette
%ͻ
%                       Procedure VESA_SetRGBPalette                        
%ͼ

 PROTOTYPE :
 Procedure VESA_SetRGBPalette(C,R,G,B:Byte);

 UNIT...: ~Unit MOS_GPH~
 IN.....: C (BYTE) = Number of the color.                                  
          R, G, B (BYTE) = Value of colors (of 0 to 63).                   
 OUT....: /                                                                
 EXPLAIN: Set the RGB values of the specified color.                       

:VESA_GetRGBPalette
%ͻ
%                       Procedure VESA_GetRGBPalette                        
%ͼ

 PROTOTYPE :
 Procedure VESA_GetRGBPalette(C:Byte; Var R,G,B:Byte);

 UNIT...: ~Unit MOS_GPH~
 IN.....: C (BYTE) = Number of the color.                                  
 OUT....: R, G, B (BYTE) = Value of colors (of 0 to 63).                   
 EXPLAIN: Get the RGB values of the specified color.                       

:Set_Palette256
%ͻ
%                         Procedure Set_Palette256                          
%ͼ

 PROTOTYPE :
 Procedure Set_Palette256 (Var Pal : TPalette256);

 UNIT...: ~Unit MOS_GPH~
 IN.....: Pal (TPALETTE256) = Array of colors.                             
 OUT....: /                                                                
 EXPLAIN: Set the 256 RGB values of the palette of a 256 color mode.       

:VESA_SetViewPort
%ͻ
%                        Procedure VESA_SetViewPort                         
%ͼ

 PROTOTYPE :
 Procedure VESA_SetViewPort(x1, y1, x2, y2 : integer; Clip : boolean);

 UNIT...: ~Unit MOS_GPH~
 IN.....: X1,Y1,X2,Y2 (WORD) = Coordinates for the SetViewPort.            
          Clip (BOOLEAN) = TRUE if clipping is set, else FALSE.            
 OUT....: /                                                                
 EXPLAIN: Sets the current output viewport or window for graphics output   
 BUGS...: I don't test if coordinates are in the screen.                   
 CF.....: Unit GRAPH from Tp7.                                             

:VESA_GetViewSettings
%ͻ
%                      Procedure VESA_GetViewSettings                       
%ͼ

 PROTOTYPE :
 Procedure VESA_GetViewSettings(var ViewPort : TViewPortType);

 UNIT...: ~Unit MOS_GPH~
 IN.....: /                                                                
 OUT....: ViewPort (TVIEWPORTTYPE) = Get the SetViewPort parameters.       
 EXPLAIN: Get the SetViewPort parameters.                                  

:Vesa_FillPoly
%ͻ
%                          Procedure Vesa_FillPoly                          
%ͼ

 PROTOTYPE :
 Procedure Vesa_FillPoly( Num : Word;var PolyPoints);

 UNIT...: ~Unit MOS_GPH~
 IN.....: Num (WORD) = Number of intersection in the polygon.              
          Polypoints (UNTYPED) = Array witch contain the coordinates of    
          each intersection in the polygon.                                
 OUT....: /                                                                
 EXPLAIN: Draw a fill polygon.                                             
 BUGS...: 1) Only convex polygons.                                        
          2) No patterns for the filling ...                              
          3) Not exactly the same result that FillPoly from graph.tpu     
              but it's very near.                                          
 CF.....: Unit GRAPH from Tp7.                                             

:VESA_DrawPoly
%ͻ
%                          Procedure VESA_DrawPoly                          
%ͼ

 PROTOTYPE :
 Procedure VESA_DrawPoly(NumPoints: Word; var PolyPoints);

 UNIT...: ~Unit MOS_GPH~
 IN.....: NumPoints (WORD) = Number of intersection in the polygon.        
          Polypoints (UNTYPED) = Array of intersections.                   
 OUT....: /                                                                
 EXPLAIN: Draw a polyon.                                                   
          No difference with GRAPH of Tp7.                                 
 CF.....: Unit GRAPH from Tp7.                                             

:VESA_Circle
%ͻ
%                           Procedure VESA_Circle                           
%ͼ

 PROTOTYPE :
 Procedure VESA_Circle(X,Y,Rad,Color:Longint);

 UNIT...: ~Unit MOS_GPH~
 IN.....: X,Y (WORD) = Coordinates of the center of the circle to draw     
          Rad (WORD) = Radius of the circle.                               
          Color (LONGINT) = Color of the circle                            
 OUT....: /                                                                
 EXPLAIN: Draw a circle.                                                   
 CF.....: Unit GRAPH from Tp7.                                             

:VESA_ClearViewPort
%ͻ
%                       Procedure VESA_ClearViewPort                        
%ͼ

 PROTOTYPE :
 Procedure VESA_ClearViewPort;

 UNIT...: ~Unit MOS_GPH~
 IN.....: /                                                                
 OUT....: /                                                                
 EXPLAIN: Clear the screen with the color 0.                               
 OPT....: Can be optimized.                                                
 CF.....: Unit GRAPH from Tp7.                                             

:VESA_MOSTestMode
%ͻ
%                         Function VESA_MOSTestMode                         
%ͼ

 PROTOTYPE :
 Function VESA_MOSTestMode(Mode:Byte):Boolean;

 UNIT...: ~Unit MOS_GPH~
 IN.....: Mode (BYTE) = Mos video mode to test.                            
 OUT....: /                                                                
 EXPLAIN: Test if a video exist and can be set.                            
 SEE ALSO..: 
    ~VESA_Initgraph~

:VESA_FillShape
%ͻ
%                         Procedure VESA_FillShape                          
%ͼ

 PROTOTYPE :
 Procedure VESA_FillShape(X,Y,Color:Integer);

 UNIT...: ~Unit MOS_GPH~
 IN.....: (X,Y) (INTEGER) = Coordinates of the pixel where to begin.       
          Color (INTEGER) = New color to put.                              
 OUT....: /                                                                
 EXPLAIN: Fill a part of the screen with a new color.                      

:VESA_SetFillStyle
%ͻ
%                        Procedure VESA_SetFillStyle                        
%ͼ

 PROTOTYPE :
 Procedure VESA_SetFillStyle(Pattern, Color : Word);

 UNIT...: ~Unit MOS_GPH~
 IN.....: Pattern (WORD) = Fill pattern.                                   
          Color   (WORD) = Fill color.                                     
 OUT....: /                                                                
 EXPLAIN: Sets the pattern and color for all filling done by FillPoly,     
          Bar, Bar3D, and PieSlice                                         
 CF.....: Unit GRAPH from Tp7.                                             
 BUGS...: NOT CODED                                                        

:VESA_GetWriteMode
%ͻ
%                        Function VESA_GetWriteMode                         
%ͼ

 PROTOTYPE :
 Function VESA_GetWriteMode:Integer;

 UNIT...: ~Unit MOS_GPH~
 IN.....: /                                                                
 OUT....: (INTEGER) = Current WriteMode                                    
 EXPLAIN: Get the WriteMode.                                               
 CF.....: Unit GRAPH from Tp7.                                             

:VESA_SetWriteMode
%ͻ
%                        Procedure VESA_SetWriteMode                        
%ͼ

 PROTOTYPE :
 Procedure VESA_SetWriteMode(WriteMode : Integer);

 UNIT...: ~Unit MOS_GPH~
 IN.....: WriteMode (INTEGER) = NormalPut    0    MOV                    
                                CopyPut      0    MOV                    
                                XORPut       1    XOR                    
                                OrPut        2    OR                     
                                AndPut       3    AND                    
                                NotPut       4    NOT                    
 OUT....: /                                                                
 EXPLAIN: Set the WriteMode.                                               
 CF.....: Unit GRAPH from Tp7.                                             

:VESA_SetFillPattern
%ͻ
%                       Procedure VESA_SetFillPattern                       
%ͼ

 PROTOTYPE :
 Procedure VESA_SetFillPattern(Pattern: TFillPatternType; Color: Word);

 UNIT...: ~Unit MOS_GPH~
 IN.....: Pattern (TFILLPATTERNTYPE) = Array witch contain the pattern.    
          Color (WORD) = Color of the filling                              
 OUT....: /                                                                
 EXPLAIN: Selects a user-defined fill pattern.                             
 CF.....: SetFillPattern from tp7                                          


:Wait
%ͻ
%                               Function Wait                               
%ͼ

 PROTOTYPE :
 Function Wait:Boolean;

 UNIT...: ~Unit MOS_KBD~
 IN.....: /                                                                
 OUT....: (BOOLEAN) = TRUE if anything is pressed (Keyboard or Mouse).     
 EXPLAIN: Return TRUE if something is pressed.                             
 EXAMPLE: Wait;                                                            


:TAN
%ͻ
%                               Function TAN                                
%ͼ

 PROTOTYPE :
 Function TAN(x:extended):extended;

 UNIT...: ~Unit MOS_MAT~
 IN.....: X (EXTENDED) = Input value.                                      
 OUT....: (EXTENDED) = Calculated value.                                   
 EXPLAIN: Calculate value using the above mathematical function.           

:SEC
%ͻ
%                               Function SEC                                
%ͼ

 PROTOTYPE :
 Function SEC(x:extended): extended;

 UNIT...: ~Unit MOS_MAT~
 IN.....: X (EXTENDED) = Input value.                                      
 OUT....: (EXTENDED) = Calculated value.                                   
 EXPLAIN: Calculate value using the above mathematical function.           

:SINH
%ͻ
%                               Function SINH                               
%ͼ

 PROTOTYPE :
 Function SINH(x:extended): extended;

 UNIT...: ~Unit MOS_MAT~
 IN.....: X (EXTENDED) = Input value.                                      
 OUT....: (EXTENDED) = Calculated value.                                   
 EXPLAIN: Calculate value using the above mathematical function.           

:TANH
%ͻ
%                               Function TANH                               
%ͼ

 PROTOTYPE :
 Function TANH(x:extended): extended;

 UNIT...: ~Unit MOS_MAT~
 IN.....: X (EXTENDED) = Input value.                                      
 OUT....: (EXTENDED) = Calculated value.                                   
 EXPLAIN: Calculate value using the above mathematical function.           

:SECH
%ͻ
%                               Function SECH                               
%ͼ

 PROTOTYPE :
 Function SECH(x:extended): extended;

 UNIT...: ~Unit MOS_MAT~
 IN.....: X (EXTENDED) = Input value.                                      
 OUT....: (EXTENDED) = Calculated value.                                   
 EXPLAIN: Calculate value using the above mathematical function.           

:POWER
%ͻ
%                              Function POWER                               
%ͼ

 PROTOTYPE :
 Function POWER(x,Exponent:extended):extended;

 UNIT...: ~Unit MOS_MAT~
 IN.....: X (EXTENDED) = Input value.                                      
          Exponent (EXTENDED) = Exponent for the power.                    
 OUT....: (EXTENDED) = Calculated value.                                   
 EXPLAIN: Calculate value using the above mathematical function.           

:ROOT
%ͻ
%                               Function ROOT                               
%ͼ

 PROTOTYPE :
 Function ROOT(x,TheRoot:extended):extended;

 UNIT...: ~Unit MOS_MAT~
 IN.....: X (EXTENDED) = Input value for Square Root.                      
          TheRoot (EXTENDED) = Square Root Power.                          
 OUT....: (EXTENDED) = Calculated value.                                   
 EXPLAIN: Calculate value using the above mathematical function.           

:Solve
%ͻ
%                              Function Solve                               
%ͼ

 PROTOTYPE :
 Function Solve(formule:string;var resultat:string):integer;

 UNIT...: ~Unit MOS_MAT~
 IN.......: Formule (STRING) = Mathematical expression to evaluate.        
            Resultat (STRING) = Calculated value.                          
 OUT......: Return 0 if no error else return error position in string.     
 EXPLAIN..: Numerical Analysor Expressions.                                

:Mse_Show
%ͻ
%                            Procedure Mse_Show                             
%ͼ

 PROTOTYPE :
 Procedure Mse_Show;

 UNIT...: ~Unit MOS_MSE~
 IN.....: /                                                                
 OUT....: /                                                                
 EXPLAIN: Show the mouse.                                                  

:Mse_Hide
%ͻ
%                            Procedure Mse_Hide                             
%ͼ

 PROTOTYPE :
 Procedure Mse_Hide;

 UNIT...: ~Unit MOS_MSE~
 IN.....: /                                                                
 OUT....: /                                                                
 EXPLAIN: Hide the mouse.                                                  

:Mse_Get
%ͻ
%                             Procedure Mse_Get                             
%ͼ

 PROTOTYPE :
 Procedure Mse_Get(Var X,Y:Word;Var G,M,D:Boolean);

 UNIT...: ~Unit MOS_MSE~
 IN.....: /                                                                
 OUT....: X,Y (WORD) = Mouse coordinates.                                  
          G,M,D (BOOLEAN) = State of mouse buttons.                        
 EXPLAIN: Return mouse position and buttons states.                        
          G=Gauche (Left), M=Milieu (Center), D=Droit (Right)              
 EXAMPLE: Mse_Get(X,Y,G,M,D); Writeln(X,Y,G,M,D);                      

:Mse_Put
%ͻ
%                             Procedure Mse_Put                             
%ͼ

 PROTOTYPE :
 Procedure Mse_Put(X,Y:Word);

 UNIT...: ~Unit MOS_MSE~
 IN.....: X,Y (WORD) = Mouse coordinates.                                  
 OUT....: /                                                                
 EXPLAIN: Put the mouse on X,Y coordinates.                                
 EXAMPLE: Mse_Put(2,2);                                                    

:Mse_TestBox
%ͻ
%                           Function Mse_TestBox                            
%ͼ

 PROTOTYPE :
 Function Mse_TestBox(X1,Y1,X2,Y2,B:Word):Boolean;

 UNIT...: ~Unit MOS_MSE~
 IN.....: X1,Y1,X2,Y2 (WORD) = Box where to test the mouse position.       
          B (WORD) = Code of buttons to test + of the zone.                
          0 = Test Zone + Buttons not activated                            
          1 = Test Zone + Left Buttons                                     
          2 = Test Zone + Middle Buttons                                   
          3 = Test Zone + Right Buttons                                    
         10 = Test Zone however the state of the buttons                   
 OUT....: (BOOLEAN)                                                        
 EXPLAIN: Test if the mouse is in the specified box.                       
 EXAMPLE: If Mse_TestBox(10,15,5,6,3)=True Then Writeln('OK');             

:Mse_Limit
%ͻ
%                            Procedure Mse_Limit                            
%ͼ

 PROTOTYPE :
 Procedure Mse_Limit(X1,Y1,X2,Y2:Word);

 UNIT...: ~Unit MOS_MSE~
 IN.....: X1,Y1,X2,Y2 (WORD) = Coordinates of the limit box.               
 OUT....: /                                                                
 EXPLAIN: Limit the move of the mouse in box.                              
 EXAMPLE: Mse_Limit(16,50,5,10);                                           

:Mse_SetDoubleClick
%ͻ
%                       Procedure Mse_SetDoubleClick                        
%ͼ

 PROTOTYPE :
 Procedure Mse_SetDoubleClick(T:Integer);

 UNIT...: ~Unit MOS_MSE~
 IN.....: T (INTEGER): Value in Ms for a Double Click                      
 OUT....: /                                                                
 EXPLAIN: Define again the delay of a double click.                        
 EXAMPLE: MSE_SetDoubleClick(100);                                         

:Mse_TestDoubleClick
%ͻ
%                       Function Mse_TestDoubleClick                        
%ͼ

 PROTOTYPE :
 Function Mse_TestDoubleClick:Boolean;

 UNIT...: ~Unit MOS_MSE~
 IN.....: /                                                                
 OUT....: (BOOLEAN) = TRUE if double click success                         
 EXPLAIN: To know if a double clicked on an item.                          
 EXAMPLE: If Mse_TestDoubleClick Then ...                                  

:Mse_SetDelay
%ͻ
%                          Procedure Mse_SetDelay                           
%ͼ

 PROTOTYPE :
 Procedure Mse_SetDelay(T:Integer);

 UNIT...: ~Unit MOS_MSE~
 IN.....: T (INTEGER): Value in Ms for a delay click.                      
 OUT....: /                                                                
 EXPLAIN: Define again the delay of a click.                               
 EXAMPLE: Mse_SetDelay(100);                                               

:Mse_TestDelay
%ͻ
%                          Function Mse_TestDelay                           
%ͼ

 PROTOTYPE :
 Function Mse_TestDelay:Boolean;

 UNIT...: ~Unit MOS_MSE~
 IN.....: /                                                                
 OUT....: (BOOLEAN) = TRUE if mouse delay passed, else FALSE.              
 EXPLAIN: To know if the Delay Mouse Clicked is past.                      
 EXAMPLE: If Mse_TestDelay=True Then ...                                   

:Mse_SetPointer
%ͻ
%                         Procedure Mse_SetPointer                          
%ͼ

 PROTOTYPE :
 Procedure Mse_SetPointer(Style:Byte);

 UNIT...: ~Unit MOS_MSE~
 IN.....: Style (BYTE): Number of the style pointer.                       
 OUT....: /                                                                
 EXPLAIN: Change the mouse pointer.                                        
          Constants you can use for Style :                                
          - "P_Arrow"  = 1 = Normal pointer (arrow).                       
          - "P_Busy"   = 2 = Wait pointer (Busy,Watch).                    
          - "P_Hand"   = 3 = Hand pointer.                                 
          - "P_Text"   = 4 = Text pointer.                                 
          - "P_Target" = 5 = Target pointer (draw application...).         
          - "P_Move"   = 6 = Move pointer.                                 
          - "P_Head"   = 7 = Dead head pointer.                            
          - "P_MoveX"  = 8 = Horizontal move pointer.                      

:Mse_SetPointerMode
%ͻ
%                       Procedure Mse_SetPointerMode                        
%ͼ

 PROTOTYPE :
 Procedure Mse_SetPointerMode(Mode:Byte);

 UNIT...: ~Unit MOS_MSE~
 IN.....: Mode (BYTE) = Mode of management of the mouse pointer.           
 OUT....: /                                                                
 EXPLAIN: Define the type of management of the mouse pointer.              
          Constants you can use for Mode :                                 
          - "P_AutoMode" = 1 = Management of the mouse pointer by MOS      
          - "P_UserMode" = 2 = Management of the mouse pointer by user.    

:Mse_Pointers
%ͻ
%                          Procedure Mse_Pointers                           
%ͼ

 PROTOTYPE :
 Procedure Mse_Pointers;

 UNIT...: ~Unit MOS_MSE~
 IN.....: /                                                                
 OUT....: /                                                                
 EXPLAIN: Manage the different mouse pointers.                             

:Mse_InitDemo
%ͻ
%                          Procedure Mse_InitDemo                           
%ͼ

 PROTOTYPE :
 Procedure Mse_InitDemo(S:String;Recording:Boolean);

 UNIT...: ~Unit MOS_MSE~
 IN.....: S (STRING) = Name of the file                                    
          Recording (BOOLEAN) =                                            
             TRUE  = Record of the demo                                    
             FALSE = Read of the demo                                      
 OUT....: /                                                                
 EXPLAIN: Initialise the read or write of a demo of a MOS application.     
 EXAMPLE: Mse_InitDemo('DEMO.LMP',TRUE);  Record the demo.                 

:Mse_DoneDemo
%ͻ
%                          Procedure Mse_DoneDemo                           
%ͼ

 PROTOTYPE :
 Procedure Mse_DoneDemo;

 UNIT...: ~Unit MOS_MSE~
 IN.....: /                                                                
 OUT....: /                                                                
 EXPLAIN: End the execution of the recording or reading of the demo.       
          This procedure must be always call after an Mse_InitDemo.        

:Mse_Clicked
%ͻ
%                           Function Mse_Clicked                            
%ͼ

 PROTOTYPE :
 Function Mse_Clicked(Num:Integer):Boolean;

 UNIT...: ~Unit MOS_MSE~
 IN.....: Num (INTEGER) = Code of buttons to test + of the zone.           
            0 = Test Zone + Buttons not activated                          
            1 = Test Zone + Left Buttons                                   
            2 = Test Zone + Middle Buttons                                 
            3 = Test Zone + Right Buttons                                  
           10 = Test Zone however the state of the buttons                 
 OUT....: (BOOLEAN) = TRUE if clicked, else FALSE.                         
 EXPLAIN: Test if one Button of the mouse is clicked.                      
 EXAMPLE: If Mse_Clicked=True Then ...                                     

:Mse_Speed
%ͻ
%                            Procedure Mse_Speed                            
%ͼ

 PROTOTYPE :
 Procedure Mse_Speed(X,Y:Integer);

 UNIT...: ~Unit MOS_MSE~
 IN.....: X (INTEGER) = Mickeys                                            
          Y (INTEGER) = Pixels                                             
 OUT....: /                                                                
 EXPLAIN: Define the yield between Mickeys and Pixels.                     
 EXAMPLE: Mse_Speed(5,10);                                                 

:Mse_Blanker
%ͻ
%                           Procedure Mse_Blanker                           
%ͼ

 PROTOTYPE :
 Procedure Mse_Blanker;

 UNIT...: ~Unit MOS_MSE~
 IN.....: /                                                                
 OUT....: /                                                                
 EXPLAIN: Manage the mouse blanker.                                        

:Mse_GetPosInGrid
%ͻ
%                        Procedure Mse_GetPosInGrid                         
%ͼ

 PROTOTYPE :
 Procedure Mse_GetPosInGrid(Var X,Y:Word);

 UNIT...: ~Unit MOS_MSE~
 IN.....: X,Y (WORD) = X,Y coordinates to test.                            
 OUT....: X,Y (WORD) = New coordinates perharps modified.                  
 EXPLAIN: Put the coordinates X,Y in function of the grid if the grid is   
          set.                                                             

:Mse_GetVersion
%ͻ
%                          Function Mse_GetVersion                          
%ͼ

 PROTOTYPE :
 Function Mse_GetVersion:String;

 UNIT...: ~Unit MOS_MSE~
 IN.....: /                                                                
 OUT....: (STRING) = Version of mouse driver.                              
 EXPLAIN: Return the version of mouse driver installed.                    

:Mse_GetType
%ͻ
%                           Function Mse_GetType                            
%ͼ

 PROTOTYPE :
 Function Mse_GetType:String;

 UNIT...: ~Unit MOS_MSE~
 IN.....: /                                                                
 OUT....: (STRING) = Type of mouse installed.                              
 EXPLAIN: Return the type of mouse installed.                              

:Mse_Test
%ͻ
%                             Function Mse_Test                             
%ͼ

 PROTOTYPE :
 Function Mse_Test:Boolean;

 UNIT...: ~Unit MOS_MSE~
 IN.....: /                                                                
 OUT....: (BOOLEAN) = TRUE if mouse is installed, else FALSE               
 EXPLAIN: Test if the mouse is present (Mouse driver loaded).              
          This function reinit mouse driver and if an handler is loaded,   
          it's reset.                                                      

:Time_TestTimer
%ͻ
%                          Function Time_TestTimer                          
%ͼ

 PROTOTYPE :
 Function Time_TestTimer(V:Integer; Var T:TClock):Boolean;

 UNIT...: ~Unit MOS_TOO~
 IN......: V (INTEGER) = Delay in Second.                                  
           T (TClock) = Tclock variable.                                   
 OUT.....: (BOOLEAN) = TRUE if the delay is ended, else FALSE.             
 EXPLAIN.: Create a Timer witch will return TRUE when the delay is ended.  

:Time_GetTime
%ͻ
%                           Function Time_GetTime                           
%ͼ

 PROTOTYPE :
 Function Time_GetTime(Mode:Byte; Var T:TClock):String;

 UNIT...: ~Unit MOS_TOO~
 IN.....: Mode (BYTE) = Not used now, will be later.                       
          T (TClock) = TClock variable structure TClock.                   
 OUT....: (STRING) = Return the hour in the string.                        
 EXPLAIN: Return a string witch contain the current time.                  
          If the time d'ont change since last call, the function return    
          an empty string.                                                 
 NB.....: To use with "Display" procedure.                                 
 SEE ALSO..: 
    ~Display~

:Time_GetDayName
%ͻ
%                         Function Time_GetDayName                          
%ͼ

 PROTOTYPE :
 Function Time_GetDayName(Pd:Word):Byte;

 UNIT...: ~Unit MOS_TOO~
 IN......: Pd (WORD) = Day Packed                                          
 OUT.....: Res (BYTE) = N of the day of the week (0 <-> 6).               
 EXPLAIN.: Returns the N of the day of the week (Calender julien)         
 NB......: The day 0 = Monday to 6=Sunday.                                 

:Time_PackDate
%ͻ
%                          Function Time_PackDate                           
%ͼ

 PROTOTYPE :
 Function Time_PackDate(D,Mth,Yr:Word):Word;

 UNIT...: ~Unit MOS_TOO~
 IN......: D,Mth,Yr (WORD) = Day, Month and Year of the date.              
 OUT.....: (WORD) = Packed day.                                            
 EXPLAIN.: Transform a date to a julian date.                              
 NB......: This function work between years 1901  2078.                   

:Time_UnPackDate
%ͻ
%                         Procedure Time_UnPackDate                         
%ͼ

 PROTOTYPE :
 Procedure Time_UnPackDate(Var D,Mth,Yr:Word; PD:Longint);

 UNIT...: ~Unit MOS_TOO~
 IN......: PD (WORD) = Packed day.                                         
 OUT.....: D,Mth,Yr (WORD) = Day, Month and Year of the packed day.        
 EXPLAIN.: Returns the date in function of the packed date.                
 NB......: This function work between years 1901  2078.                   

:Time_GetDaysInMonth
%ͻ
%                       Function Time_GetDaysInMonth                        
%ͼ

 PROTOTYPE :
 Function Time_GetDaysInMonth(M,Y:Word):Byte;

 UNIT...: ~Unit MOS_TOO~
 IN......: Month,Year (WORD) = Month and Year.                             
 OUT.....: (BYTE) = Number of days in the month.                           
 EXPLAIN.: Returns the numbers of days in the specified month.             
 NB......: This function works between years 1901 to 2078.                 

:Time_GetSTime
%ͻ
%                          Function Time_GetSTime                           
%ͼ

 PROTOTYPE :
 Function Time_GetSTime:String;

 UNIT...: ~Unit MOS_TOO~
 IN.....: /                                                                
 OUT....: (STRING) = Return the time in a string.                          
 EXPLAIN: Return a string witch contain the current time (with seconds).   
 SEE ALSO..: 
    ~Time_GetSDate~

:Time_GetSDate
%ͻ
%                          Function Time_GetSDate                           
%ͼ

 PROTOTYPE :
 Function Time_GetSDate:String;

 UNIT...: ~Unit MOS_TOO~
 IN.....: /                                                                
 OUT....: (STRING) = Return the date in a string.                          
 EXPLAIN: Return a string witch contain the current date.                  
 SEE ALSO..: 
    ~Time_GetSTime~

:StringBox
%ͻ
%                            Procedure StringBox                            
%ͼ

 PROTOTYPE :
 Procedure StringBox(X1,Y1,X2,Y2,C1,C2:Integer; Style:Boolean);

 UNIT...: ~Unit MOS_TOO~
 IN.....: X1,Y1,X2,Y2 (INTEGER) = Coodinates of box on screen.             
          C1,C2 (INTEGER) = Styles and filling color.                      
          Style (BOOLEAN) = Style of box (True=surrounded, False=Refief).  
 OUT....: /                                                                
 EXPLAIN: Draw a box (Style String-Box)                                    
 EXAMPLE: StringBox(10,100,130,110,0,7,True);                              

:TitleBox
%ͻ
%                            Procedure TitleBox                             
%ͼ

 PROTOTYPE :
 Procedure TitleBox(X1,Y1,X2,Y2,Color:Integer; Title:String; Id:Word);

 UNIT...: ~Unit MOS_TOO~
 IN.....: X1,Y1,X2,Y2 (INTEGER) = Position and size of the box.            
          Title (STRING) = Title of the box.                               
          Id (BYTE) = Parameters for visuals aspects.                      
             0  $0001  1 = Title on the rigth (0=left).                    
             1  $0002  1 = Title on relief.                                
             2  $0004  1 = Double box (0 = Simple).                        
             3  $0008  1 = Toggled box.                                    
             4  $0010  1 = Fill the background of the box.                 
             5  $0020  1 = Use menus fonts (ITAL.CHR).                     
             6  $0040  1 = Use font MODN.CHR.                              
             7  $0080  1 = Emulate the old MOS title design.               
 OUT....: /                                                                
 EXPLAIN: Display a box with a title on screen.                            

:Tool_Line
%ͻ
%                            Procedure Tool_Line                            
%ͼ

 PROTOTYPE :
 Procedure Tool_Line(X1,Y1,X2,Y2,Style,Relief:Integer);

 UNIT...: ~Unit MOS_TOO~
 IN.....: X1,Y1,X2,Y2 (INTEGER) = Line coordinates.                        
          Style (INTEGER) = Style of the line.                             
          Relief (INTEGER) = Relief: 0=Relief, 1=Shadow.                   
 OUT....: /                                                                
 EXPLAIN: Draw a line in relief.                                           
 EXAMPLE: Tool_VESA_Line(0,0,130,110,1);                                   

:Screen_Blanker
%ͻ
%                         Procedure Screen_Blanker                          
%ͼ

 PROTOTYPE :
 Procedure Screen_Blanker;

 UNIT...: ~Unit MOS_TOO~
 IN.....: /                                                                
 OUT....: /                                                                
 EXPLAIN: Manage the Screen Blanker.                                       
 NB.....: This procedure musn't called by user (automatically call).       

:Screen_BlankerInit
%ͻ
%                       Procedure Screen_BlankerInit                        
%ͼ

 PROTOTYPE :
 Procedure Screen_BlankerInit;

 UNIT...: ~Unit MOS_TOO~
 IN.....: /                                                                
 OUT....: /                                                                
 EXPLAIN: Reinit the Screen Blanker timer.                                 

:Test_AnythingActioned
%ͻ
%                      Function Test_AnythingActioned                       
%ͼ

 PROTOTYPE :
 Function Test_AnythingActioned(Var P:TAction; Mode:Byte):Boolean;

 UNIT...: ~Unit MOS_TOO~
 IN.....: P (TACTION) = Record witch will contains all infos               
          Mode (BYTE) = C_Init    = 1 = Initialise the P record            
                        C_Execute = 2 = Test if there is an action         
 OUT....: P (TACTION) = Record witch will contains all infos               
          (BOOLEAN) = If an action is detected and you are in mode=2 then  
                      return TRUE, else FALSE                              
 EXPLAIN: Test if an action (Key pressed, mouse button pressed or mouse    
          moved) is made.                                                  

:Printer_Init
%ͻ
%                          Procedure Printer_Init                           
%ͼ

 PROTOTYPE :
 Procedure Printer_Init(Num:Byte);

 UNIT...: ~Unit MOS_HAR~
 IN.....: Num (BYTE) = N of the printer (0,1,2).                          
 OUT....: /                                                                
 EXPLAIN: Init again the printer like when it start.                       
 SEE ALSO..: 
    ~Print_Screen~
    ~Printer_IsReady~

:Printer_IsReady
%ͻ
%                         Function Printer_IsReady                          
%ͼ

 PROTOTYPE :
 Function Printer_IsReady(Num:Byte):Boolean;

 UNIT...: ~Unit MOS_HAR~
 IN.....: Num (BYTE) = N of the printer (0,1,2).                          
 OUT....: (BOOLEAN) = TRUE if ready to print, else FALSE                   
 EXPLAIN: Test if the printer is ready to print.                           
 SEE ALSO..: 
    ~Printer_Init~
    ~PrinterGetErrorCode~

:Req_Hardware
%ͻ
%                          Procedure Req_Hardware                           
%ͼ

 PROTOTYPE :
 Procedure Req_Hardware(X1,Y1:Integer; Name:String);

 UNIT...: ~Unit MOS_HAR~
 IN.....: X1,Y1 (INTEGER) = Requester coordinates.                         
          Name (STRING) = Window name.                                     
 OUT....: /                                                                
 EXPLAIN: Display and manage a hardware requester.                         
 NB.....: With some Pentium processor a major error occurs!                
 EXAMPLE: Req_Hardware(200,100,'YOUR SYSTEM CONFIGURATION IS...');         

:Req_Memory
%ͻ
%                           Procedure Req_Memory                            
%ͼ

 PROTOTYPE :
 Procedure Req_Memory(X1,Y1:Integer; Name:String);

 UNIT...: ~Unit MOS_HAR~
 IN.....: X1,Y1 (INTEGER) = Requester coordinates.                         
          Name (STRING) = Window name.                                     
 OUT....: /                                                                
 EXPLAIN: Display some information about memory.                           

:Protect_Software
%ͻ
%                         Function Protect_Software                         
%ͼ

 PROTOTYPE :
 Function Protect_Software(Days:Integer):Boolean;

 UNIT...: ~Unit MOS_PRO~
 IN.....: Days (INTEGER) = Number of days before to lock software.         
 OUT....: (BOOLEAN) = TRUE=Software must be locked.                        
 EXPLAIN: Test if a software must be locked if the days delay is out.      


:Normal_Colors
%ͻ
%                          Procedure Normal_Colors                          
%ͼ

 PROTOTYPE :
 Procedure Normal_Colors;

 UNIT...: ~Unit MOS_COL~
 IN.....: /                                                                
 OUT....: /                                                                
 EXPLAIN: Switch to Normal colors.                                         

:RGB_To_HSV
%ͻ
%                           Procedure RGB_To_HSV                            
%ͼ

 PROTOTYPE :
 Procedure RGB_To_HSV(R,G,B:Real; Var H,S,V:Real);

 UNIT...: ~Unit MOS_COL~
 IN.....: R,G,B (REAL) = RGB values for the color.                         
 OUT....: H,S,V (REAL) = HSV values for the color.                         
 EXPLAIN: Convert the RGB values in HSV values for a color.                

:YCrCb_To_RGB
%ͻ
%                          Procedure YCrCb_To_RGB                           
%ͼ

 PROTOTYPE :
 Procedure YCrCb_To_RGB(Y,Cr,Cb:Real; Var R,G,B:Real);

 UNIT...: ~Unit MOS_COL~
 IN.....: Y,Cr,Cb (REAL) = YCrCb values for the color.                     
 OUT....: R,G,B (REAL) = RGB values for the color.                         
 EXPLAIN: Convert the YCrCb values in RGB values for a color.              

:RGB_To_YCrCb
%ͻ
%                          Procedure RGB_To_YCrCb                           
%ͼ

 PROTOTYPE :
 Procedure RGB_To_YCrCb(R,G,B:Real; Var Y,Cr,Cb:Real);

 UNIT...: ~Unit MOS_COL~
 IN.....: R,G,B (REAL) = RGB values for the color.                         
 OUT....: Y,Cr,Cb (REAL) = YCrCb values for the color.                     
 EXPLAIN: Convert the RGB values in YCrCb values for a color.              

:Req_Colors
%ͻ
%                           Procedure Req_Colors                            
%ͼ

 PROTOTYPE :
 Procedure Req_Colors(Px,Py,NumOnglet:Integer; Title:String);

 UNIT...: ~Unit MOS_COL~
 IN.....: /                                                                
 OUT....: /                                                                
 EXPLAIN: Display and manage a Color Requester.                            
          Allow the user to pick a specified color using various           
          specialized colors requesters.                                   

:Req_SelectColor
%ͻ
%                         Function Req_SelectColor                          
%ͼ

 PROTOTYPE :
 Function Req_SelectColor(Px,Py,Col:Integer; Pal:Longint; Title:String):
          Longint;

 UNIT...: ~Unit MOS_COL~
 IN.....: Px,Py (INTEGER) = Requester position.                            
          Col (INTEGER) = Selected color (Entry).                          
          Pal (LONGINT) = Numbers of colors in palette.                    
          Title (STRING) = Title requester.                                
 OUT....: (LONGINT) = Return selected color number.                        
 EXPLAIN: Display a palette and allow you to select a color.               

:Upper
%ͻ
%                              Function Upper                               
%ͼ

 PROTOTYPE :
 Function Upper(SUP:String):String;

 UNIT...: ~Unit MOS_STR~
 IN.....: SUP (STRING) = Input String                                      
 OUT....: (STRING) = String result                                         
 EXPLAIN: Transform a string to capital letters                            
 EXAMPLE: Writeln(Upper(FREderic)) ='FREDERIC'                             
 SEE ALSO..: 
    ~Lower~
    ~Midder~

:Midder
%ͻ
%                              Function Midder                              
%ͼ

 PROTOTYPE :
 Function Midder(SUP:String):String;

 UNIT...: ~Unit MOS_STR~
 IN.....: SUP (STRING) = Input String                                      
 OUT....: (STRING) = String result                                         
 EXPLAIN: Transform a string to small letters except first letter will     
          be in capital letter.                                            
 EXAMPLE: Writeln(Midder(FREderic)) ='Frederic'                            
 SEE ALSO..: 
    ~Lower~
    ~Upper~

:Str_Count
%ͻ
%                            Function Str_Count                             
%ͼ

 PROTOTYPE :
 Function Str_Count(S:String;Sep:Char):Byte;

 UNIT...: ~Unit MOS_STR~
 IN.....: s : (STRING) = String source.                                    
          sep : (CHAR) = Char witch separate substrings in the string s    
 OUT....: (BYTE) = Number of columns counted.                              
 EXPLAIN: Count the number of columns in a string . This result is the     
          same as the number of separator +1.                              
 EXAMPLE: Str_Count('18/01/1998','/') = 3                                  
          Str_Count('toto',';')       = 1                                  
          Str_Count('1;3;5;7;9;',';') = 6                                  
          Str_Count('toto;',';')      = 2                                  
 SEE ALSO..: 
    ~Str_Get~
    ~Str_Delete~
    ~Str_Insert~
    ~Str_Put~

:Str_Get
%ͻ
%                             Function Str_Get                              
%ͼ

 PROTOTYPE :
 Function Str_Get(s:string;num:integer;Sep:char):string;

 UNIT...: ~Unit MOS_STR~
 IN.....: s : (STRING) = String source.                                    
          num : (INTEGER) = N of the substring to extract                 
          sep : (CHAR) = Char witch separate substrings in the string s    
 OUT....: (STRING) = Substring extracted.                                  
 EXPLAIN: Extract a substring from a string with contain substring         
          separated by separators (sep).                                   
 EXAMPLE: Str_get('18/01/1998',2,'/')   = '01'                             
          Str_get('t;oio;ertt',3,';')   = 'ertt'                           
          Str_get('t;oio;ertt',4,';')   = ''                               
          Str_get('t;oio;ertt',0,';')   = ''                               
          Str_get('t;oio;ertt',2,';')   = 'oio'                            
 SEE ALSO..: 
    ~Str_Delete~
    ~Str_Insert~
    ~Str_Put~
    ~Str_Count~

:Str_Delete
%ͻ
%                            Function Str_Delete                            
%ͼ

 PROTOTYPE :
 Function Str_Delete(s:string;num:integer;Sep:char):string;

 UNIT...: ~Unit MOS_STR~
 IN.....: s : (STRING) = String source.                                    
          num : (INTEGER) = N of the substring to delete.                 
          sep : (CHAR) = Char witch separate substrings in the string s    
 OUT....: (STRING) = String result.                                        
 EXPLAIN: Delete a substring from a string with contain substrings         
          separated by a separator (sep).                                  
 EXAMPLE: Str_Delete('18/01/1998',2,'/')   = '18/1998'                     
          Str_Delete('t;oio;ertt',4,';')   = 't;oio;ertt'                  
          Str_Delete('t;oio;ertt',0,';')   = 't;oio;ertt'                  
          Str_Delete('t;oio;ertt',2,';')   = 't;ertt'                      
 SEE ALSO..: 
    ~Str_Get~
    ~Str_Insert~
    ~Str_Put~
    ~Str_Count~

:Str_Insert
%ͻ
%                            Function Str_Insert                            
%ͼ

 PROTOTYPE :
 Function Str_Insert(s,substring:string;num:integer;Sep:char):string;

 UNIT...: ~Unit MOS_STR~
 IN.....: s : (STRING) = String source.                                    
          substring : (STRING) = Substring to insert.                      
          num : (INTEGER) = N of the position to insert the substring     
          sep : (CHAR) = Char witch separate substrings in the string s    
 OUT....: (STRING) = String result.                                        
 EXPLAIN: Insert at position num a substring with will be delimited by     
          separators.                                                      
 EXAMPLE: Str_Insert('18/1998','01',2,'/')      = '18/01/1998'             
          Str_Insert('t;oio;ertt','jp',4,';')   = 't;oio;ertt;jp'          
          Str_Insert('t;oio;ertt','jp',0,';')   = 'jp;t;oio;ertt'          
          Str_Insert('t;oio;ertt','jp',2,';')   = 't;jp;oio;ertt'          
          Str_Insert('t','jp',3,';')            = 't;;jp'                  
 SEE ALSO..: 
    ~Str_Get~
    ~Str_Delete~
    ~Str_Put~
    ~Str_Count~

:Str_Put
%ͻ
%                             Function Str_Put                              
%ͼ

 PROTOTYPE :
 Function Str_Put(s,substring:string;num:integer;Sep:char):string;

 UNIT...: ~Unit MOS_STR~
 IN.....: s : (STRING) = String source.                                    
          substring : (STRING) = Substring to put.                         
          num : (INTEGER) = N of the substring to replace.                
          sep : (CHAR) = Char witch separate substrings in the string s    
 OUT....: (STRING) = String result.                                        
 EXPLAIN: Put at position num (column num) the substring.                  
          Every column is delimited by separators (sep).                   
 EXAMPLE: Str_Put('18/1998','01',2,'/')      = '18/01'                     
          Str_Put('t;oio;ertt','jp',4,';')   = 't;oio;ertt;jp'             
          Str_Put('t;oio;ertt','jp',0,';')   = 'jp;t;oio;ertt'             
          Str_Put('t;oio;ertt','jp',2,';')   = 't;jp;ertt'                 
          Str_Put('t','jp',3,';')            = 't;;jp'                     
 OPT....: Can be optimised if needed.                                      
 SEE ALSO..: 
    ~Str_Get~
    ~Str_Delete~
    ~Str_Insert~
    ~Str_Count~

:Str_S2C
%ͻ
%                             Function Str_S2C                              
%ͼ

 PROTOTYPE :
 Function Str_S2C(St:String):Char;

 UNIT...: ~Unit MOS_STR~
 IN.....: St (STRING) = Input String                                       
 OUT....: (CHAR) = Return the first char of the String                     
 EXPLAIN: Return the first char of the string.                             
 NB.....: If the string is empty, return also a char ...                   
 SEE ALSO..: 
    ~Str_C2S~

:Str_C2S
%ͻ
%                             Function Str_C2S                              
%ͼ

 PROTOTYPE :
 Function Str_C2S(C:Char):String;

 UNIT...: ~Unit MOS_STR~
 IN.....: C (CHAR) = Char to convert in a string[1]                        
 OUT....: (STRING) = String result witch contain the only char C           
 EXPLAIN: Return a string witch contain 1 char : C                         
 SEE ALSO..: 
    ~Str_S2C~

:Str_A2S
%ͻ
%                             Function Str_A2S                              
%ͼ

 PROTOTYPE :
 Function Str_A2S(A:Array of Char;Max:Byte):String;

 UNIT...: ~Unit MOS_STR~
 IN......: A : (ARRAY OF CHAR) = Array source.                             
           Max : (BYTE) = Number maximun of char of the array.             
 OUT.....: (STRING) = String result.                                       
 EXPLAIN.: Transform an rray of char finished by a #0 in a pascal string   
 EXAMPLE.: Write(Str_A2S('toto'+#0+#0+'oi'));                              
           Show 'toto'                                                     

:Str_Po2S
%ͻ
%                             Function Str_Po2S                             
%ͼ

 PROTOTYPE :
 Function Str_Po2S(p:pointer):String;

 UNIT...: ~Unit MOS_STR~
 IN.....: P (POINTER) = Adress to put in format XXXX:XXXX in the string    
 OUT....: (STRING) = String result.                                        
 EXPLAIN: This function convert an address in a string format              
          (Hexadecimal).                                                   
 EXAMPLE: Str_Po2S(P) = '1C45:0060' for example                            

:Str_P2S
%ͻ
%                             Function Str_P2S                              
%ͼ

 PROTOTYPE :
 Function Str_P2S(P:Pointer;Size:Byte):String;

 UNIT...: ~Unit MOS_STR~
 IN.....: P (POINTER) : pointer on a buffer.                               
          Size (BYTE) : Size of buffer.                                    
 OUT....: (STRING) : String result.                                        
 EXPLAIN: Convert a buffer to a string.                                    

:Str_S2P
%ͻ
%                             Procedure Str_S2P                             
%ͼ

 PROTOTYPE :
 Procedure Str_S2P(S:String;P:Pointer;Size:Byte);

 UNIT...: ~Unit MOS_STR~
 IN.....: S (STRING) : String source.                                      
          P (POINTER) : pointer on a buffer.                               
          Size (BYTE) : size of this buffer.                               
 OUT....: /                                                                
 EXPLAIN: Copy a string to a buffer witch the adress is in P.              
 NB....1: If the string is < buffer, space complete the buffer.            
 NB....2: If the string is > buffer, string is cut to the size of buffer.  

:Str_D2S
%ͻ
%                             Function Str_D2S                              
%ͼ

 PROTOTYPE :
 Function Str_D2S(Year:Word;Month,Day:Byte):String;

 UNIT...: ~Unit MOS_STR~
 IN.....: Year  : (WORD) = Year                                            
          Month : (BYTE) = Month                                           
          Day   : (BYTE) = Day                                             
 OUT....: S : (STRING) = String result (AAAAMMJJ)                          
 EXPLAIN: Convert a date to a string like this : AAAAMMJJ                  
 EXAMPLE: Writeln(Str_D2S(1998,01,31));                                    
          Result : 19980131                                                

:Str_S2D
%ͻ
%                             Function Str_S2D                              
%ͼ

 PROTOTYPE :
 Function Str_S2D(S:String;Var Year:Word;Var Month,Day:Byte):Boolean;

 UNIT...: ~Unit MOS_STR~
 IN.....: S : (STRING) = String to convert.                                
 OUT....: Year  : (WORD) = Year                                            
          Month : (BYTE) = Month                                           
          Day   : (BYTE) = Day                                             
          (BOOLEAN) = TRUE if all is OK, else FALSE.                       
 EXPLAIN: Transform a string (AAAAMMJJ) to 3 numbers.                      
 EXAMPLE: Var j,m:Byte;a:word;Res:Boolean                                  
          Res=Str_S2D('19980131',a,m,j)                                    
          Writeln('Transformation OK ? : ',Res);                           
          Writeln('Day : ',j',' Month : ',m,' Year : ',a);                 

:Str_S2PC
%ͻ
%                            Procedure Str_S2PC                             
%ͼ

 PROTOTYPE :
 Procedure Str_S2PC(Dest: PChar; Source: String);

 UNIT...: ~Unit MOS_STR~
 IN.....: Dest : (PCHAR) = The variable witch will receive the result.     
          Source : (STRING) = String to convert.                           
 OUT....: Dest : (PCHAR) String converted.                                 
 EXPLAIN: This function convert string to Pchar (array of char with a #0   
          to end the string).                                              
 EXAMPLE: Var fn:Array[0..63]Of Char;                                      
              s:string;                                                    
          Begin                                                            
           STRPCOPY(fn,s); (*String -->PCHAR*)                             
          End;                                                             

:Str_S2H
%ͻ
%                             Function Str_S2H                              
%ͼ

 PROTOTYPE :
 Function Str_S2H(S:String):String;

 UNIT...: ~Unit MOS_STR~
 IN.....: S (STRING) = Input string                                        
 OUT....: (STRING) = String result                                         
 EXPLAIN: Take each caracter of the string S, and return the hexadecimal   
          ascii code.                                                      
 EXAMPLE: Str_S2H('A0z') = '41 30 71'                                      

:Str_CorrectChars
%ͻ
%                         Function Str_CorrectChars                         
%ͼ

 PROTOTYPE :
 Function Str_CorrectChars(Str : String):String;

 UNIT...: ~Unit MOS_STR~
 IN.....: Str (STRING) = Input String                                      
 OUT....: (STRING) = Outpur String                                         
 EXPLAIN: The String passed in parameter is analysed and unaccentuated.    
 NB.....: This char conversion concern french,spanish and english.         

:Str_Base2L
%ͻ
%                            Function Str_Base2L                            
%ͼ

 PROTOTYPE :
 Function Str_Base2L(St:String;Base:Byte):Longint;

 UNIT...: ~Unit MOS_STR~
 IN.....: St : (STRING) = Number in a base between 2..36                   
          Base : (Byte) = Base                                             
 OUT....: (LONGINT) : Number St (in base Base) converted in longint.       
 EXPLAIN: Convert a number exprimed in a base <> of base 10 to a longint   
          which is independant of any base choosen.                        
 NB.....: The number must be correct, you can check it with Check_Base.    
 BUGS...: Numbers <0.                                                      

:Str_L2Base
%ͻ
%                            Function Str_L2Base                            
%ͼ

 PROTOTYPE :
 Function Str_L2Base(N:Longint;Base:Byte):String;

 UNIT...: ~Unit MOS_STR~
 IN.....: N : (LONGINT) = Number                                           
          Base : (Byte) = Base                                             
 OUT....: (STRING) = Number converted in the correct base.                 
 EXPLAIN: Convert a number N, a longint to a choosen base. Typicaly <> of  
          base 10 because str make this work for base 10.                  
 BUGS...: Numbers <0.                                                      

:Str_L2H
%ͻ
%                             Function Str_L2H                              
%ͼ

 PROTOTYPE :
 Function Str_L2H(L:Longint;Format:Byte):String;

 UNIT...: ~Unit MOS_STR~
 IN.....: L : (LONGINT) = Number to convert in Hexadecimal.                
          Format : (BYTE) = Number of character the number must take       
                            (Completed with 0)                             
 OUT....: (STRING) : String Result.                                        
 EXPLAIN: Convert a number L, a longint to a string witch represent the    
          same number but in Hexadecimal Base.                             
 EXAMPLE: Writeln(str_l2h(100,0)); = 64                                    
          Writeln(str_l2h(100,1)); = 64                                    
          Writeln(str_l2h(100,4)); = 0064                                  
 NB 1...: If the number take more char than specified in Format, all the   
          number is writen, so the size of the string result > Format...   
 NB 2...: If you don't want any 0 before the number, use Format=0.         
 BUGS...: Numbers <0.                                                      

:Str_H2L
%ͻ
%                             Function Str_H2L                              
%ͼ

 PROTOTYPE :
 Function Str_H2L(S:String):Longint;

 UNIT...: ~Unit MOS_STR~
 IN.....: S (STRING) = Number in hexadecimal to convert to longint.        
 OUT....: (LONGINT) = Result.                                              
 EXPLAIN: Convert an hexadecimal number (S) to a normal longint.           
 EXAMPLE: Writeln(Str_H2L('$F6A'));                                        
 NB.....: Return -1 if illegal characters found.                           
 BUGS...: Numbers <0.                                                      

:Str_CorrectPath
%ͻ
%                         Function Str_CorrectPath                          
%ͼ

 PROTOTYPE :
 Function Str_CorrectPath(S:String):String;

 UNIT...: ~Unit MOS_STR~
 IN.....: S (STRING) = Input String                                        
 OUT....: (STRING) = String result                                         
 EXPLAIN: If a string contain one or several times the substring '\\'      
          then replace it by '\'.                                          
 EXAMPLE: Writeln(Str_CorrectPath('c:\\dos')) = 'c:\dos'                   

:Str_FillZero
%ͻ
%                           Function Str_FillZero                           
%ͼ

 PROTOTYPE :
 Function Str_FillZero(W:Word;Num:Byte):String;

 UNIT...: ~Unit MOS_STR~
 IN.....: W (WORD) = Word value.                                           
          Num (WORD) = Number of characters the string will be long        
                       (Completed by 0).                                   
 OUT....: (STRING) = Return the string completed.                          
 EXPLAIN: Return a string completed with Zeros before if needs.            
 EXAMPLE: Str_FillZero(5,2) = '05'                                         
          Str_FillZero(55,2) = '55'                                        
          Str_FillZero(5,5) = '00005'                                      

:Str_Int
%ͻ
%                             Function Str_Int                              
%ͼ

 PROTOTYPE :
 Function Str_Int(S:String;Pos:Byte):LongInt;

 UNIT...: ~Unit MOS_STR~
 IN.....: S (STRING) = String where the extract must begin                 
          Pos (BYTE) = Position where begin the extraction                 
 OUT....: (LONGINT) = Return number extracted.                             
                      If at the position there is no number, return 0      
 EXPLAIN: Get a number at a position from a string.                        

:Str_Replace
%ͻ
%                           Function Str_Replace                            
%ͼ

 PROTOTYPE :
 Function Str_Replace(S,Sub,Rep:String):String;

 UNIT...: ~Unit MOS_STR~
 IN.....: S (STRING) = Source string.                                      
          Sub (STRING) = Substring of S witch the function must replace    
          Rep (STRING) = String witch contain the replacement of Sub       
 OUT....: (STRING) = String result.                                        
 EXPLAIN: This function replace a substring in the source string by the    
          rep string.                                                      
 EXAMPLE: Str_Replace('%1 toto %1','%1','t')  =  't toto t'                

:Str_GetWordNum
%ͻ
%                          Function Str_GetWordNum                          
%ͼ

 PROTOTYPE :
 Function Str_GetWordNum(S:String;Num:Byte):String;

 UNIT...: ~Unit MOS_STR~
 IN.....: S (STRING) = String witch contain a sentence.                    
          Num (BYTE) = N of the word to get.                              
 OUT....: (STRING) = Word number Num.                                      
 EXPLAIN: Get the "Num"'th word.                                           

:Str_CountWords
%ͻ
%                          Function Str_CountWords                          
%ͼ

 PROTOTYPE :
 Function Str_CountWords(S:String):Byte;

 UNIT...: ~Unit MOS_STR~
 IN.....: S (STRING) = String witch contain a sentence.                    
 OUT....: (BYTE) = Number of words in this string.                         
 EXPLAIN: Count the number of word in the string.                          

:Str_CountItem
%ͻ
%                          Function Str_CountItem                           
%ͼ

 PROTOTYPE :
 Function Str_CountItem(S,SubSt:String):Byte;

 UNIT...: ~Unit MOS_STR~
 IN.....: S (STRING) = String                                              
          SubSt (STRING)= SubString witch contain the the item to search   
 OUT....: (BYTE) = Number of SubStr found in S.                            
 EXPLAIN: Count how many times the string S contains the SubString SubSt   
 EXAMPLE: Str_CountItem('toto is here, isn't he ?','is') = 2               
          Str_CountItem('12341512','12')   = 2                             
          Str_CountItem('totototo','toto') = 2                             

:Str_Fill
%ͻ
%                             Function Str_Fill                             
%ͼ

 PROTOTYPE :
 Function Str_Fill(s:string;taille:integer;Sens:Byte):string;

 UNIT...: ~Unit MOS_STR~
 IN.....: S : (STRING) = String source.                                   
          Taille : (INTEGER) = Size of the string with the spaces they    
                   will be insert.                                        
          Sens : (BYTE) = 0 : Insert before the string                    
                          1 : Insert after the string                     
 OUT....: (STRING) = String result.                                       
 EXPLAIN: Complete a string with spaces.                                  
 EXAMPLE: Str_Fill('toto',8,0) = '    toto'                               
          Str_Fill('toto',8,1) = 'toto    '                               
          Str_Fill('toto',3,0) = 'oto'                                    
          Str_Fill('toto',3,1) = 'tot'                                    

:Str_Clear
%ͻ
%                            Function Str_Clear                             
%ͼ

 PROTOTYPE :
 Function Str_Clear(s:String):String;

 UNIT...: ~Unit MOS_STR~
 IN.....: s : (STRING) = String source.                                    
 OUT....: (STRING) = Substring extracted.                                  
 EXPLAIN: Delete all the spaces before and after the string.               
 EXAMPLE: Str_clear('  toto est ici  ')   = 'toto est ici'                 
          Str_clear('     99         ')   = '99'                           

:Str_Data2S
%ͻ
%                            Function Str_Data2S                            
%ͼ

 PROTOTYPE :
 Function Str_Data2S(P:Pointer;Deb,Qte:Integer):String;

 UNIT...: ~Unit MOS_STR~
 IN.....: P (POINTER) : Pointer on a buffer.                               
          Deb (INTEGER) : Where begin the extraction.                      
          The first byte is indexed 0.                                     
          Qt (INTEGER) : Quantity of bytes to copy.                       
 OUT....: (STRING) : String result.                                        
 EXPLAIN: Extract from an pointer a string. The value indexed at deb and   
          the last (deb+qtt) will be copied.                               
 EXAMPLE: If P^=  ABCDEFG                                                  
                  0123456 <- This is only an help to count.                
          Writeln(Str_Data2S(p,1,3));                                      
          Will write : BCD                                                 

:Str_Format
%ͻ
%                            Function Str_Format                            
%ͼ

 PROTOTYPE :
 Function Str_Format(StIn:String; Sep:Char; Block:Byte):String;

 UNIT...: ~Unit MOS_STR~
 IN.....: StIn (STRING) = String source.                                   
          Sep (Char) = Separator of blocks                                 
          Block (Byte) = size of the blocks (in number of char).           
 OUT....: StOut (STRING) = String Formated.                                
 EXPLAIN: Format a string this the parameters.                             
 EXAMPLE: '0123456789' with Sparatot  '.' and blocks of 3 :               
          '0.123.456.789'                                                  

:Str_Mask
%ͻ
%                             Function Str_Mask                             
%ͼ

 PROTOTYPE :
 Function Str_Mask(StIn:String; Sep,Base:Char):String;

 UNIT...: ~Unit MOS_STR~
 IN.....: StIn (STRING) = String source.                                   
          Sep (Char)  = Sparator of blocks.                               
          Base (Char) = Basic Char.                                        
 OUT....: StOut (STRING) = Mask of the string.                             
 EXPLAIN: Create a mask for a string.                                      
 EXAMPLE: '12:27' with Separator ':' and Basic Char '8' = '88:88'.         

:Str_PosLast
%ͻ
%                           Function Str_PosLast                            
%ͼ

 PROTOTYPE :
 Function Str_PosLast(Substr: String; S: String): Byte;

 UNIT...: ~Unit MOS_STR~
 IN.....: Substr : (STRING) = Substring to search in the String S          
          S : (STRING) = String where the search is made                   
 OUT....: (BYTE) = Position of the last substring found in S.              
 EXPLAIN: Str_Pos_Last Searches for Substr within S and returns an integer 
          value that is the index of last character of Substr within S.    
          If Substr is not found, Str_Pos_Last returns zero.               
          This function is like pascal Pos but it takes the last substring 
          found.                                                           
 EXAMPLE: Str_Pos_Last('to','toto') = 3                                    
          Str_Pos_Last('to','titi') = 0                                    
          Str_Pos_Last('to','toto is toto') = 11                           

:Str_TestPos
%ͻ
%                           Function Str_TestPos                            
%ͼ

 PROTOTYPE :
 Function Str_TestPos(S,Sub:String;i:Byte):Boolean;

 UNIT...: ~Unit MOS_STR~
 IN.....: S (STRING) = String to test if the sub string is on position I   
          Sub (STRING) = SubString                                         
          I (BYTE) = Exact position where to search if Sub is in S         
 OUT....: (BOOLEAN) = TRUE if Sub is at the position i in the string S     
 EXPLAIN: Test if the substring is at the position i in S.                 
 EXAMPLE: Str_TestPos('toto','to',3)= TRUE                                 
          Str_TestPos('toto','to',2)= FALSE                                

:Str_Cut
%ͻ
%                             Function Str_Cut                              
%ͼ

 PROTOTYPE :
 Function Str_Cut(S,Sub:String;Flg:Byte):String;

 UNIT...: ~Unit MOS_STR~
 IN.....: S (STRING) = Substring to cut                                    
          Sub (STRING) = SubString witch decide the begin or end of the cut
          Flg (BYTE) =                                                     
          Bit  Num  Action if the bit is set :                             
           0   01   Begin the cut at Sub else End the cut at Sub           
           1   02   If there is more than 1 SubString in the string        
                    Use first, else the last                               
 OUT....: (STRING) = Get a part of the string                              
 EXPLAIN: Cut a part of the string                                         
 EXAMPLE: Str_Cut('toto(*is(*here','(*',0) = 'here'                        
          Str_Cut('toto(*is(*here','(*',1) = 'toto(*is'                    
          Str_Cut('toto(*is(*here','(*',2) = 'is(*here'                    
          Str_Cut('toto(*is(*here','(*',3) = 'toto'                        

:Str_Suppr
%ͻ
%                            Function Str_Suppr                             
%ͼ

 PROTOTYPE :
 Function Str_Suppr(S,S1,S2:String):String;

 UNIT...: ~Unit MOS_STR~
 IN.....: S (STRING) = String to treat                                     
          S1 (STRING) = First item witch indicate the beginning of the cut 
          S2 (STRING) = Last item witch indicate the end of the cut        
 OUT....: (STRING) = String result                                         
 EXPLAIN: Cut S between S1 and S2.                                         
 EXAMPLE: Str_Suppr('readkey; (* read a key *)','(*','*)') = 'readkey; '.  
          Str_Suppr('abc(*def*)ghi(*jkl*)','(*','*)') = 'abcghi'.          
          Str_Suppr('abc*)def(*ghi*)j(*kl','(*','*)') = 'abc*)defj(*kl'.   

:Str_GetWord
%ͻ
%                           Function Str_GetWord                            
%ͼ

 PROTOTYPE :
 Function Str_GetWord(S:String;Pos:Byte):String;

 UNIT...: ~Unit MOS_STR~
 IN.....: S (STRING) = A string witch contain a sentence.                  
          Pos (BYTE) = Position where to begin the extraction of the word  
 OUT....: (STRING) = String result.                                        
 EXPLAIN: Extract a word witch we know the position from a string.         
 EXAMPLE: Writeln(Str_GetWord('toto is here',9))  = 'here'                 
 NB.....: Writeln(Str_GetWord('MOS_STR'),1)       = 'MOS_STR'              

:Str_Center
%ͻ
%                            Function Str_Center                            
%ͼ

 PROTOTYPE :
 Function Str_Center(S:String; Sub:String):String;

 UNIT...: ~Unit MOS_STR~
 IN.....: S (STRING) = Main string.                                        
          Sub (STRING = SubString to copy on S but centered.               
 OUT....: /                                                                
 EXPLAIN: Copy Sub in the center of the string S.                          
 EXAMPLE: Writeln(Str_Center('1 3 5 7 9','ABC') = '1 3ABC7 9'              

:Str_CleanSpaces
%ͻ
%                         Function Str_CleanSpaces                          
%ͼ

 PROTOTYPE :
 Function Str_CleanSpaces(S:String):String;

 UNIT...: ~Unit MOS_STR~
 IN.....: S (STRING) = String input                                        
 OUT....: (STRING) = String result                                         
 EXPLAIN: Keep only one spaces between each word, and delete the spaces at 
          the begining or the end of the string.                           
 EXAMPLE: Str_CleanSpaces('  toto  is    here   ') = 'toto is here'        

:Str_Extract
%ͻ
%                           Function Str_Extract                            
%ͼ

 PROTOTYPE :
 Function Str_Extract(S,S1,S2:String):String;

 UNIT...: ~Unit MOS_STR~
 IN.....: S (STRING) = String input                                        
          S1 (STRING) = First item witch indicate the beginning of the copy
          S2 (STRING) = Last item witch indicate the end of the copy       
 OUT....: (STRING) = The substring witch is between S1 and S2              
 EXPLAIN: Extract the substring witch is between the 2 items S1 and S2     
 EXAMPLE: Str_Extract('toto (* and me*) was here','(*','*)') = ' and me'   

:Str_Spaces
%ͻ
%                            Function Str_Spaces                            
%ͼ

 PROTOTYPE :
 Function Str_Spaces(N:Byte):String;

 UNIT...: ~Unit MOS_STR~
 IN.....: N (BYTE) = Number of spaces to put                               
 OUT....: (STRING) = return N spaces ' '                                   
 EXPLAIN: This function return a string with N spaces.                     
 EXAMPLE: Writeln(Str_Spaces(3)); = '   ';                                 

:Str_ParamCount
%ͻ
%                          Function Str_ParamCount                          
%ͼ

 PROTOTYPE :
 Function Str_ParamCount(S:String):Byte;

 UNIT...: ~Unit MOS_STR~
 IN.....: S (STRING) = String parameter                                    
 OUT....: (BYTE) = Number of "parameters" found in S                       
 EXPLAIN: This function return the number of "parameters" it founds in this
          string. It's the same like ParamCount from DOS unit but the      
          difference is this function is not on command line parameter but 
          on the string S.                                                 
 EXAMPLE: Writeln(Str_ParamCount('-INI=F:\T.INI /? /S'))  =  3             
          Writeln(Str_ParamCount('Toto is here))          =  3             
          Writeln(Str_ParamCount(''))                     =  0             
 SEE ALSO..: 
    ~Str_ParamStr~
 CF.....: ParamCount from Tp7                                              

:Str_ParamStr
%ͻ
%                           Function Str_ParamStr                           
%ͼ

 PROTOTYPE :
 Function Str_ParamStr(S:String;Num:Byte):String;

 UNIT...: ~Unit MOS_STR~
 IN.....: S (STRING) = String parameter                                    
          Num (BYTE) = N of the parameter to get.                         
 OUT....: (STRING) = String result (Parameter N Num)                      
 EXPLAIN: Get a Num'th parameter from S.This function is like ParamStr     
          from DOS unit, but the difference is this function is not on     
          Command line but on the string S.                                
 EXAMPLE: Writeln(Str_ParamStr('-INI=F:\T.INI /? /S',1))  =  '/?'          
          Writeln(Str_ParamStr('Toto is here',0))         =  'Toto'        
          Writeln(Str_ParamStr('',1))                     =  ''            
 NB.....: Not that Str_ParamStr return an empty string ('').               
 SEE ALSO..: 
    ~Str_ParamCount~
 CF.....: ParamStr from Tp7                                                

:Parameter
%ͻ
%                            Function Parameter                             
%ͼ

 PROTOTYPE :
 Function Parameter(Var St:String):Byte;

 UNIT...: ~Unit MOS_STR~
 IN.....: St (STRING) = Parameter to test                                  
 OUT....: St (STRING) = If parameter followed by '=xxx' then return 'xxx'  
          (BYTE) = Position where is found the parameter, else if not      
                   found return 0.                                         
 EXPLAIN: Test if the program is launch with the parameter St.If the anwser
          is yes, send the position of this parameter.                     
          And if the parameter is followed by '=xxx',St is replaced by     
          'xxx'.                                                           
 EXAMPLE: toto.exe /record=test.lmp /machin                                
          S:='/Record';                                                    
          Parameter(S) = 2 & S='/TEST.LMP'                                 
          S:='/Truc'                                                       
          Parameter(S) = 0 & S='/TRUC'                                     
          S:='/Machin'                                                     
          Parameter(S) = 3 & S='/MACHIN'                                   
 SEE ALSO..: 
    ~ParameterMOS~
    ~Str_Parameter~
 CF.....: ParamStr, ParamCount from Tp7                                    

:Str_Parameter
%ͻ
%                          Function Str_Parameter                           
%ͼ

 PROTOTYPE :
 Function Str_Parameter(S:String;Var St:String):Byte;

 UNIT...: ~Unit MOS_STR~
 IN.....: S (STRING) = String source                                       
          St (STRING) = Parameter to look for in S                         
 OUT....: St (STRING) = If parameter followed by '=xxx' then return 'xxx'  
          (BYTE) = Position where is found the parameter, else if not      
                   found return 0.                                         
 EXPLAIN: Test if the string S contain the parameter St.If the anwser      
          is yes, send the position of this parameter is.                  
          And if the parameter is followed by '=xxx',St is replaced by     
          'xxx'.                                                           
 EXAMPLE: S:='toto.exe /record=test.lmp /machin'                           
          Code           Result                                            
          St:='/Record';  Str_Parameter(S,St) = 2 & St='TEST.LMP'          
          St:='/Truc';    Str_Parameter(S,St) = 0 & St='/TRUC'             
          St:='/Machin';  Str_Parameter(S,St) = 3 & St='/MACHIN'           
          Example 2 : s='toto.exe /record="test here" /machin'             
          St:='/Record';  Str_Parameter(S,St) = 2 & St='/TEST HERE'        
 SEE ALSO..: 
    ~Parameter~
    ~ParameterMOS~

:Str_GetCommandLine
%ͻ
%                        Function Str_GetCommandLine                        
%ͼ

 PROTOTYPE :
 Function Str_GetCommandLine:String;

 UNIT...: ~Unit MOS_STR~
 IN.....: /                                                                
 OUT....: (STRING) = Return the complete line command parameter.           
 EXPLAIN: Return the complete command line parameter included the program  
          name.                                                            
 EXAMPLE: If you execute this under dos :                                  
          toto.exe /record=test.lmp /machin                                
          and here the code of toto.pas :                                  
          Uses mos_str;                                                    
          Begin                                                            
          Writeln(Str_GetParamLine)                                        
          End.                                                             
          The result will be :                                             
          toto.exe /record=test.lmp /machin                                
 SEE ALSO..: 
    ~Str_Parameter~

:Str_WildCards
%ͻ
%                          Function Str_WildCards                           
%ͼ

 PROTOTYPE :
 Function Str_WildCards(S:String;Mask:String):String;

 UNIT...: ~Unit MOS_STR~
 IN.....: S : (STRING) = String source                                     
                         (A FileName without Extension for example)        
          Mask : (STRING) = String witch can contain WildCards             
 OUT....: (STRING) = String result                                         
 EXPLAIN: Transform a String in another allowing * and ? as Wildcards.     
          The Char '*' = All the rest of the string will not be changed    
          The Char '?' = The letter of the string source will not be       
                         change.                                           
          All other char = Replaced by this char.                          
 EXAMPLE: Str_WildCards('toto','?i?i')   = 'titi'                          
          Str_WildCards('123456','0123') = '0123'                          
          Str_WildCards('toto.i','t*.pas') = 'toto.i'                      
          Str_WildCards('123456','0*99') = '023456'                        
          Str_WildCards('123456','0*1?') = '023456'                        
 NB.....: This function don't make like dos example (C.F. Last example)    
          It works only on string.                                         
 SEE ALSO..: 
    ~Str_FileMask~

:Str_FileMask
%ͻ
%                           Function Str_FileMask                           
%ͼ

 PROTOTYPE :
 Function Str_FileMask(FileName:String;Mask:String):String;

 UNIT...: ~Unit MOS_STR~
 IN.....: S : (STRING) = String source                                     
                         (A FileName+Extension without Path for example)   
          Mask : (STRING) = String witch can contain WildCards             
 OUT....: (STRING) = String result                                         
 EXPLAIN: Transform a fileName to another using the Mask witch contains    
          Wilcard.                                                         
 EXAMPLE: Str_FileMask('toto.pas','autoexec.bat') = 'autoexec.bat'         
          Str_FileMask('toto.pas','*.bat')        = 'toto.bat'             
          Str_FileMask('toto.pas','a?toexec.bat') = 'aotoexec.bat'         
          Str_FileMask('toto.pas','au*.bat')      = 'auto.bat'             
          Str_FileMask('toto.pas','au*.b*')       = 'auto.bas'             
          Str_FileMask('toto.pas','a??oexec.ba?') = 'aotoexec.bat'         
 NB.....: This function use Str_WildCards                                  
 BUGS...: S must be only FileName, it must contain no path !!!             
 SEE ALSO..: 
    ~Str_Wildcards~

:Str_Extr
%ͻ
%                             Function Str_Extr                             
%ͼ

 PROTOTYPE :
 Function Str_Extr(PS,PS2:String):String;

 UNIT...: ~Unit MOS_STR~
 IN.....: PS (STRING) = Path to extract                                    
          PS2 (STRING) = Path from the extraction                          
 OUT....: (STRING) =  Path exctracted                                      
 EXPLAIN: /                                                                
 EXAMPLE: Str_Extr('c:\dos\','c:\dos\toto\') = 'toto\'                     

:Str_PathRelative
%ͻ
%                         Function Str_PathRelative                         
%ͼ

 PROTOTYPE :
 Function Str_PathRelative(P1,P2:String):String;

 UNIT...: ~Unit MOS_STR~
 IN.....: P1 (STRING) = Path where you are in.                             
          P2 (STRING) = Path or filename you want in relative.             
 OUT....: (STRING) = String result                                         
 EXPLAIN: Return the relative path of a filename or a path.                
          This function make the oposite job of FExpand.                   
 EXAMPLE: Str_PathRelative('f:\cd\examples','f:\cd\system')='..\system'    
          Str_PathRelative('f:\2\2','f:\2\config.sys')     ='..\config.sys'
 CF.....: FExpand from Tp7                                                 

:Max
%ͻ
%                               Function Max                                
%ͼ

 PROTOTYPE :
 Function Max(A,B:Integer):Integer;

 UNIT...: ~Unit MOS_STR~
 IN.....: A,B (INTEGER) = 2 numbers                                        
 OUT....: (INTEGER) = The maximun of this 2 numbers                        
 EXPLAIN: /                                                                
 SEE ALSO..: 
    ~Min~

:Min
%ͻ
%                               Function Min                                
%ͼ

 PROTOTYPE :
 Function Min(A,B:Integer):Integer;

 UNIT...: ~Unit MOS_STR~
 IN.....: A,B (INTEGER) = 2 numbers                                        
 OUT....: (INTEGER) = The minimum of this 2 numbers                        
 EXPLAIN: /                                                                
 SEE ALSO..: 
    ~Max~


:System_Request
%ͻ
%                          Function System_Request                          
%ͼ

 PROTOTYPE :
 Function System_Request(X1,Y1:Integer; CName:String):Byte;

 UNIT...: ~Unit MOS_SYS~
 IN.....: X1,Y1 (INTEGER) = Window position.                               
          CName (STRING) = Initialisation file to save.                    
 OUT....: Res (BYTE) = (0=Cancel, 1=Use, 2=Save).                          
 EXPLAIN: Call the MOS system configuration requester.                     
 EXAMPLE: System_Request(200,100,'MRE.INI');                              


:Show_Screen
%ͻ
%                           Procedure Show_Screen                           
%ͼ

 PROTOTYPE :
 Procedure Show_Screen;

 UNIT...: ~Unit MOS_TSK~
 IN.....: /                                                                
 OUT....: /                                                                
 EXPLAIN: Display again the screen background.                             

:Main_TaskBase
%ͻ
%                          Procedure Main_TaskBase                          
%ͼ

 PROTOTYPE :
 Procedure Main_TaskBase;

 UNIT...: ~Unit MOS_TSK~
 IN.....: /                                                                
 OUT....: /                                                                
 EXPLAIN: Manages all the tasks like errors, mouse blankers..              
 NB.....: This procedure must be called regulars, and often.               
          For example, if you make a loop, include this procedure in the   
          loop                                                             
 SEE ALSO..: 
    ~Main_TaskBase~

:RadioBox
%ͻ
%                            Procedure RadioBox                             
%ͼ

 PROTOTYPE :
 Procedure RadioBox(X,Y,Style:Integer; Id,Group,PLab:Byte; Status:Boolean; 
           Var R:TRadioBox; Cin:String);

 UNIT...: ~Unit MOS_GAD~
 IN.....: X,Y (INTEGER) = Radio Box coordinates.                           
          Style (INTEGER) = Using mode :                                   
               0 = Check Box (Invisible)                                   
               1 = Check Box (Visible)                                     
               2 = Radio Box (Exclusif check)                              
          Id (BYTE) = Control bits :                                       
               Bit 0  $01 = Private (do not touch this bit !)              
               Bit 1  $02 = Private (do not touch this bit !)              
               Bit 2  $04 = Freeze Radio Box                               
               Bit 3  $08 = Invisible Radio Box                            
               Bit 4  $10 = Select gadget using text                       
          Group (BYTE) = Group number (Only for the Radio Box).            
          PLab (BYTE) = Label Position                                     
               0 = Display text on the left                                
               1 = Display text on the right                               
          Status (BOOLEAN) = Radio Box state : TRUE = Tagged.              
          Rad1 (TRadioBox) = Pointer to the Radio Box structure.           
          Cin (STRING) = Radio Box attached text to display.               
 OUT....: /                                                                
 EXPLAIN: Define and display a Radio Box / Check Box.                      
 EXAMPLE: RadioBox(10,50,1,$10,0,1,True,Rad1,'CLICK ME');                  
 SEE ALSO..: 
    ~RadioBox_Draw~
    ~RadioBox_Freeze~
    ~RadioBox_GetMsg~

:RadioBox_Draw
%ͻ
%                          Procedure RadioBox_Draw                          
%ͼ

 PROTOTYPE :
 Procedure RadioBox_Draw(Var R:TRadioBox);

 UNIT...: ~Unit MOS_GAD~
 IN.....: Rad1 (TRadioBox) = Pointer to a RadioBox structure.              
 OUT....: /                                                                
 EXPLAIN: Display the specified gadget.                                    
 EXAMPLE: RadioBox_Draw(Rad1);                                             
 SEE ALSO..: 
    ~RadioBox~
    ~RadioBox_Freeze~
    ~RadioBox_GetMsg~

:RadioBox_Freeze
%ͻ
%                         Procedure RadioBox_Freeze                         
%ͼ

 PROTOTYPE :
 Procedure RadioBox_Freeze(Status:Boolean; Var R:TRadioBox);

 UNIT...: ~Unit MOS_GAD~
 IN.....: On/Off (BOOLEAN) = (On = Enable gadget).                         
          Rad1 (Var TRadioBox) = Pointer to the Radio Box structure.       
 OUT....: /                                                                
 EXPLAIN: Enable or disable the Radio Box gadget.                          
 EXAMPLE: RadioBox_Freeze(On,Rad1);                                        
 SEE ALSO..: 
    ~RadioBox~
    ~RadioBox_Draw~
    ~RadioBox_GetMsg~

:RadioBox_GetMsg
%ͻ
%                         Function RadioBox_GetMsg                          
%ͼ

 PROTOTYPE :
 Function RadioBox_GetMsg(Var R:TRadioBox; M:Word):Boolean;

 UNIT...: ~Unit MOS_GAD~
 IN.....: Rad1 (TRadioBox) = Pointer to the RadioBox structure.            
          M (Word) = Activation code.                                      
 OUT....: (BOOLEAN) = TRUE = Gadget selected.                              
 EXPLAIN: Test if the gadget is selected.                                  
 EXAMPLE: If RadioBox_GetMsg(Rad1,1)=TRUE Then...                          
 NB.....: To test the value of the radio box, check the "Status" field     
          of the RadioBox structure.                                       
 SEE ALSO..: 
    ~RadioBox~
    ~RadioBox_Draw~
    ~RadioBox_Freeze~

:Slider
%ͻ
%                             Procedure Slider                              
%ͼ

 PROTOTYPE :
 Procedure Slider(X1,Y1,X2,Y2,Qtt,Aff,Typ:Integer; GDep:Boolean; Var S:
           TSlider; Psl:Integer);

 UNIT...: ~Unit MOS_GAD~
 IN.....: X1,Y1,X2,Y2 (INTEGER) = Slider coordinates.                      
          Qtt (INTEGER) = Maximum number of items in list.                 
          Aff (INTEGER) = Number of displayed items in Slider.             
          Typ (INTEGER) = (0 = Horizontal, 1 = Vertical).                  
          GDep (BOOLEAN) = Display move buttons.                           
          Sld (TSlider) = Pointer to the Slider structure.                 
          Psl (INTEGER) = Set Slider cursor position in list.              
 OUT....: Psl (INTEGER) = Get Slider cursor position in list.              
 EXPLAIN: Define and display a Slider.                                     
 EXAMPLE: Slider(10,50,130,70,500,50,0,TRUE,Sld1,Sld1.Psl);                
 SEE ALSO..: 
    ~Slider_Draw~
    ~Freeze_Slider~
    ~Slider_GetMsg~

:Slider_Draw
%ͻ
%                           Procedure Slider_Draw                           
%ͼ

 PROTOTYPE :
 Procedure Slider_Draw(Var S:TSLider);

 UNIT...: ~Unit MOS_GAD~
 IN.....: Sld1 (TSlider) = Pointer to a Slider structure.                  
 OUT....: /                                                                
 EXPLAIN: Display the specified gadget.                                    
 EXAMPLE: Slider_Draw(Sld1);                                               
 SEE ALSO..: 
    ~Slider~
    ~Freeze_Slider~
    ~Slider_GetMsg~

:Slider_GetMsg
%ͻ
%                          Function Slider_GetMsg                           
%ͼ

 PROTOTYPE :
 Function Slider_GetMsg(Var S:TSlider; M:Word):Boolean;

 UNIT...: ~Unit MOS_GAD~
 IN.....: Sld1 (TSlider) = Pointer to the Slider structure.                
          M (Word) = Activation code.                                      
 OUT....: (BOOLEAN) = TRUE = Gadget selected.                              
 EXPLAIN: Test if the gadget is selected.                                  
 EXAMPLE: If Slider_GetMsg(Sld1,1)=TRUE Then...                            
 SEE ALSO..: 
    ~Slider~
    ~Slider_Draw~
    ~Freeze_Slider~

:Play_Beep
%ͻ
%                            Procedure Play_Beep                            
%ͼ

 PROTOTYPE :
 Procedure Play_Beep;

 UNIT...: ~Unit MOS_GAD~
 IN.....: /                                                                
 OUT....: /                                                                
 EXPLAIN: Play a beep and display a flash screen.                          

:VESA_TestVBE12
%ͻ
%                          Function VESA_TestVBE12                          
%ͼ

 PROTOTYPE :
 Function VESA_TestVBE12:Boolean;

 UNIT...: ~Unit MOS_VESA~
 IN.....: /                                                                
 OUT....: (BOOLEAN) = TRUE if VBE version is >=1.2, else FALSE             
 EXPLAIN: Test if video card is a VESA card 1.2 at least.                  

:VESA_Check
%ͻ
%                            Function VESA_Check                            
%ͼ

 PROTOTYPE :
 Function VESA_Check:Boolean;

 UNIT...: ~Unit MOS_VESA~
 IN.....: /                                                                
 OUT....: (BOOLEAN) : True = Video card is VESA compatible.                
                      False = Not a VESA video card.                       
 EXPLAIN: Test if video card is a VESA card.                               

:VESA_GetInfo
%ͻ
%                          Procedure VESA_GetInfo                           
%ͼ

 PROTOTYPE :
 Procedure VESA_GetInfo(Var Vesainfo);

 UNIT...: ~Unit MOS_VESA~
 IN.....: /                                                                
 OUT....: Vesainfo : (TVESAINFO) =                                         
 EXPLAIN: This procedure fill the var Vesainfo of type (TVESAINFO).        
          This type contain miscellaneous informations.                    
 SEE ALSO..: 
    ~TVESAINFO~

:VESA_GetModeInfo
%ͻ
%                        Procedure VESA_GetModeInfo                         
%ͼ

 PROTOTYPE :
 Procedure VESA_GetModeInfo(md:Word);

 UNIT...: ~Unit MOS_VESA~
 IN.....: md : (WORD) = Mode number (C.F. VESA_SetMode)                    
 OUT....: Fill the variable VesaMode.                                      
 EXPLAIN: Contain principal caracteritics of video mode.                   
 SEE ALSO..: 
    ~VESA_SetMode~

:VESA_GetMode
%ͻ
%                           Function VESA_GetMode                           
%ͼ

 PROTOTYPE :
 Function VESA_GetMode:Word;

 UNIT...: ~Unit MOS_VESA~
 IN.....: /                                                                
 OUT....: (WORD) = Mode number (C.f. Vesa_SetMode)                         
 EXPLAIN: Get the actual mode number, the mode where you are working with  
          when you call this function                                      
 SEE ALSO..: 
    ~VESA_SetMode~

:VESA_Manufacturer
%ͻ
%                        Function VESA_Manufacturer                         
%ͼ

 PROTOTYPE :
 Function VESA_Manufacturer:String;

 UNIT...: ~Unit MOS_VESA~
 IN.....: /                                                                
 OUT....: (STRING) = Name of the manufacturer of the video card.           
 EXPLAIN: Get the OemName String from the variable Vesainfo.(Get the name  
          of the manufacturer of the video card).                          
          Vesainfo.Oemname is a PChar, so it is diffrent of a string.      
          OemName=Name of the manufacturer.                                

:VGA_Check
%ͻ
%                            Function VGA_Check                             
%ͼ

 PROTOTYPE :
 Function VGA_Check:boolean;

 UNIT...: ~Unit MOS_VESA~
 IN.....: /                                                                
 OUT....: (BOOLEAN) = TRUE : The Card is a VGA (or more, like VESA) Card.  
                      FALSE : This card is not a VGA card.                 
 EXPLAIN: Get if a card is VGA compatible. If not, the card could be a     
          EGA,Mcga,CGA,hercule card                                        

:VESA_TestMode
%ͻ
%                          Function VESA_TestMode                           
%ͼ

 PROTOTYPE :
 Function VESA_TestMode(md:word):boolean;

 UNIT...: ~Unit MOS_VESA~
 IN.....: md : (WORD) = Mode number (C.F. VESA_SetMode)                    
 OUT....: (BOOLEAN) = True if md exist.                                    
 EXPLAIN: Work only on VESA and VGA cards.                                 
          This function test in the mode list if md exist.                 
 SEE ALSO..: 
    ~VESA_SetMode~

:Test_TextMode
%ͻ
%                          Function Test_TextMode                           
%ͼ

 PROTOTYPE :
 Function Test_TextMode:Boolean;

 UNIT...: ~Unit MOS_VESA~
 IN  : /                                                                   
 OUT : (BOOLEAN) : TRUE = Actual mode is a text mode.                      
                   FALSE = Actual mode is a graphic mode.                  

:VESA_SetInfo
%ͻ
%                           Function VESA_SetInfo                           
%ͼ

 PROTOTYPE :
 Function VESA_SetInfo(md:Word):Boolean;

 UNIT...: ~Unit MOS_VESA~
 IN.....: md : (WORD) = Mode number (C.F. VESA_SetMode)                    
 OUT....: (BOOLEAN) = Variables well initialized...                        
 EXPLAIN: Initilize VesaMode and VesaOn, specially for VGA modes.          
 SEE ALSO..: 
    ~VESA_SetMode~

:VESA_SetMode
%ͻ
%                           Function VESA_SetMode                           
%ͼ

 PROTOTYPE :
 Function VESA_SetMode(md:Word):Boolean;

 UNIT...: ~Unit MOS_VESA~
 IN.....: md : (WORD) = Mode number (See the mode number array)            
 OUT....: (BOOLEAN) = True : Video mode well initialized                   
                      False : Video mode cannot be initialized.            
 EXPLAIN: Set a video mode.                                                
          Mode number are hexadecimal in the array.                        
          If a mode is not supported, it will not be activated.            
                                                                           

:VESA_SizeOfVideoState
%ͻ
%                      Function VESA_SizeOfVideoState                       
%ͼ

 PROTOTYPE :
 Function VESA_SizeOfVideoState:Word;

 UNIT...: ~Unit MOS_VESA~
 IN.....: /                                                                
 OUT....: (WORD) = Number of blocks of 64 bytes needed.                    
 EXPLAIN: Get the number of blocks of 64 bytes witch are the size needed   
          to save video mode, dac. Size in byte, about 1Kb for a 256       
          color palette.                                                   
 SEE ALSO..: 
    ~SVGA_SaveVideoState~
 EXAMPLE: Var p:pointer;                                                   
          getmem(p,VESA_SizeOfVideoState*64);                              
          SVGA_SaveVideoState(p^);                                         
          ...                                                              
          ...                                                              
          SVGA_RestoreVideoState(p^);                                      

:SVGA_SaveVideoState
%ͻ
%                       Procedure SVGA_SaveVideoState                       
%ͼ

 PROTOTYPE :
 Procedure SVGA_SaveVideoState(Var buf);

 UNIT...: ~Unit MOS_VESA~
 IN.....: /                                                                
 OUT....: Buf : (UNTYPED) = where the information will be saved.           
 EXPLAIN: This procedure save informations needed to return in mode number 
          whitch you are when you call this procedure.                     
          It save video mode, palette, DAC, so it save all video mode      
          whitout screen (Picture).                                        
          This procedure is very usefull when you want to swap between     
          2 video modes.                                                   
 EXAMPLE: For example in MOS, if we are in 640*350*16c and we want to show 
          a photo in 800*600*256c.This procedure save the state of video,  
          we make after a VESA_SetMode to have 800*600*256 and then we use 
          SVGA_RestoreVideoState (It will put the correct palette and video
          mode like the last appel of SVGA_SaveVideoState.                 

:SVGA_RestoreVideoState
%ͻ
%                     Procedure SVGA_RestoreVideoState                      
%ͼ

 PROTOTYPE :
 Procedure SVGA_RestoreVideoState(Var buf);

 UNIT...: ~Unit MOS_VESA~
 IN.....: Buf : (UNTYPED) = Where SVGA_SaveVideoState have saved the infos.
 OUT....: /                                                                
 EXPLAIN: Restore video mode, dac like before the call of                  
          SVGA_SaveVideoState                                              
 SEE ALSO..: 
    ~SVGA_SaveVideoState~
    ~VESA_SizeOfVideoState~

:VGA_SizeOfVideoState
%ͻ
%                       Function VGA_SizeOfVideoState                       
%ͼ

 PROTOTYPE :
 Function VGA_SizeOfVideoState:Word;

 UNIT...: ~Unit MOS_VESA~
 IN.....: /                                                                
 OUT....: (WORD) = Number of blocks of 64 bytes needed.                    
 EXPLAIN: Same as VESA_SizeOfVideoState but for VGA mode only.             

:VGA_SaveVideoState
%ͻ
%                       Procedure VGA_SaveVideoState                        
%ͼ

 PROTOTYPE :
 Procedure VGA_SaveVideoState(Var buf);

 UNIT...: ~Unit MOS_VESA~
 IN.....: /                                                                
 OUT....: Buf : (UNTYPED) = where the information will be saved.           
 EXPLAIN: Same as SVGA_SaveVideoState but for VGA mode only.               

:VGA_RestoreVideoState
%ͻ
%                      Procedure VGA_RestoreVideoState                      
%ͼ

 PROTOTYPE :
 Procedure VGA_RestoreVideoState(Var buf);

 UNIT...: ~Unit MOS_VESA~
 IN.....: Buf : (UNTYPED) = Where SVGA_SaveVideoState have saved the infos.
 OUT....:                                                                  
 EXPLAIN: Same as SVGA_RestoreVideoState but for VGA mode only.            

:Set_Bank
%ͻ
%                            Procedure Set_Bank                             
%ͼ

 PROTOTYPE :
 Procedure Set_Bank(bank:Word);

 UNIT...: ~Unit MOS_VESA~
 IN.....: Bank : (WORD) = Number of the VESA bank to activate              
 OUT....: /                                                                
 EXPLAIN: Set a VESA bank. If you want to know what is a VESA bank, read   
          VESA documentation.                                              
          Important : Bank+1 is 10000h bytes after Bank, this procedure    
          use granularity...(So you don't need to make specifics calculs   
          with the granularity.                                            
 OPT....: Can be more optimized                                            
 SEE ALSO..: 
    ~Get_Bank~

:Play_WAV
%ͻ
%                            Procedure Play_WAV                             
%ͼ

 PROTOTYPE :
 Procedure Play_WAV(FName:String);

 UNIT...: ~Unit MOS_WAV~
 IN......: FName (STRING) = Path and File Name of the file to play         
 OUT.....: /                                                               
 EXPLAIN.: Play a wav sound file on the selected output.                   
           Sb or Speaker (Bit 11 of Id_Msg1).                              
 NB......: You must test if the file is a WAV before playing it.           

:Play_WAVSb
%ͻ
%                           Procedure Play_WAVSb                            
%ͼ

 PROTOTYPE :
 Procedure Play_WAVSb(Name_File:String);

 UNIT...: ~Unit MOS_WAV~
 IN......: Name_File (STRING) = Path + Name of the file to play            
 OUT.....: /                                                               
 EXPLAIN . Play a wav sound file on the sound blaster.                     
 NB......: You must test if the file is a WAV before playing it.           

:Play_WAVSpeaker
%ͻ
%                         Procedure Play_WAVSpeaker                         
%ͼ

 PROTOTYPE :
 Procedure Play_WAVSpeaker(Name:String);

 UNIT...: ~Unit MOS_WAV~
 IN.....: Name : (STRING) = File name                                      
 OUT....: /                                                                
 EXPLAIN: Play a wav file on the PC speaker                                
          If an error is found then Nerror:=805.                           
          805 : Error reading wav                                          

:Test_WAV
%ͻ
%                             Function Test_WAV                             
%ͼ

 PROTOTYPE :
 Function Test_WAV(Name:String):Boolean;

 UNIT...: ~Unit MOS_WAV~
 IN.....: Name : (STRING) = Path + Name of the file to test                
 OUT....: (BOOLEAN) = Return TRUE if it's a WAV file.                      
 EXPLAIN: Tet if the file is a wav file.                                   

:Use_Palette
%ͻ
%                           Procedure Use_Palette                           
%ͼ

 PROTOTYPE :
 Procedure Use_Palette;

 UNIT...: ~Unit MOS_BAS~
 IN.....: /                                                                
 OUT....: /                                                                
 EXPLAIN: Define the user colors for MOS.                                  

:Set_Font
%ͻ
%                            Procedure Set_Font                             
%ͼ

 PROTOTYPE :
 Procedure Set_Font(Name:String;Size:Byte);

 UNIT...: ~Unit MOS_BAS~
 IN.....: Name (STRING) = Font name (do not specify the path.filename only)
          Size (BYTE) = Font size (usualy beetween 1 and 4).               
 OUT....: /                                                                
 EXPLAIN: Set a user font (available fonts are in the SYSTEM\FONT drawer). 
 SEE ALSO..: 
    ~Set_CurrentFont~
    ~Set_PreviousFont~

:Set_CurrentFont
%ͻ
%                         Procedure Set_CurrentFont                         
%ͼ

 PROTOTYPE :
 Procedure Set_CurrentFont;

 UNIT...: ~Unit MOS_BAS~
 IN.....: /                                                                
 OUT....: /                                                                
 EXPLAIN: Restore the current font type and size.                          
 SEE ALSO..: 
    ~Set_Font~
    ~Set_PreviousFont~

:Set_PreviousFont
%ͻ
%                        Procedure Set_PreviousFont                         
%ͼ

 PROTOTYPE :
 Procedure Set_PreviousFont;

 UNIT...: ~Unit MOS_BAS~
 IN.....: /                                                                
 OUT....: /                                                                
 EXPLAIN: Restore the font type and size defined previously.               
 SEE ALSO..: 
    ~Set_Font~
    ~Set_CurrentFont~

:Set_UserFont
%ͻ
%                          Procedure Set_UserFont                           
%ͼ

 PROTOTYPE :
 Procedure Set_UserFont(Name:String;Size:Byte);

 UNIT...: ~Unit MOS_BAS~
 IN.....: Name (STRING) = Font name (Path + filename).                     
          Size (BYTE) = Font size (usualy beetween 1 and 4).               
 OUT....: /                                                                
 EXPLAIN: Set a user font (available fonts are in the SYSTEM\FONT drawer). 
 NB.....: This procedure is a sub routine of the Set_Font procedure.       
 SEE ALSO..: 
    ~Set_Font~
    ~Set_CurrentFont~

:ParameterMOS
%ͻ
%                           Function ParameterMOS                           
%ͼ

 PROTOTYPE :
 Function ParameterMOS(Var St:String):Byte;

 UNIT...: ~Unit MOS_BAS~
 IN.....: St (STRING) = Parameter to test                                  
 OUT....: St (STRING) = If parameter followed by '=xxx' then return 'xxx'  
          (BYTE) = Position where is found the parameter, else if not      
                   found return 0.                                         
 EXPLAIN: Test if the program is launch with the parameter St.If the anwser
          is yes, send the position of this parameter.                     
          And if the parameter is followed by '=xxx',St is replaced by     
          'xxx'.                                                           
 EXAMPLE: toto.exe /record=test.lmp /machin                                
          S:='Record';                                                     
          Parameter(S) = 2 & S='Test.lmp'                                  
          S:='Truc'                                                        
          Parameter(S) = 0 & S='Truc'                                      
          S:='Machin'                                                      
          Parameter(S) = 3 & S='Machin'                                    
 CF.....: Str_Parameter, ParamStr, ParamCount.                             
 NB.....: You must use this function if you are in MOS, else use Parameter 
 SEE ALSO..: 
    ~Parameter~
    ~Str_Parameter~

:Test_HigherVersion
%ͻ
%                        Function Test_HigherVersion                        
%ͼ

 PROTOTYPE :
 Function Test_HigherVersion(Version:String):Boolean;

 UNIT...: ~Unit MOS_BAS~
 IN.....: Version (STRING) = The minimum required version.                 
          Support the following formats :                                  
             v3.10, 3.10, 3.1, v3.1, v3.1, 3.10 or either combination.   
 OUT....: (BOOLEAN) = TRUE or FALSE.                                       
 EXPLAIN: Return TRUE if the installed MOS system version is equal         
          or higher than the required version given in parameter.          
 EXAMPLE: If Not Test_HigherVersion('3.10') Then Exit;                     

:Save_Config
%ͻ
%                           Function Save_Config                            
%ͼ

 PROTOTYPE :
 Function Save_Config(Name:String):Boolean;

 UNIT...: ~Unit MOS_BAS~
 IN.....: Name (STRING) = Path + Name of the file to save.                 
 OUT....: (BOOLEAN) = TRUE if OK, FALSE if there is an error               
 EXPLAIN: Save the configuration (parameters) of MOS or another program.   

:Play_SoundAction
%ͻ
%                        Procedure Play_SoundAction                         
%ͼ

 PROTOTYPE :
 Procedure Play_SoundAction(Num:Byte);

 UNIT...: ~Unit MOS_BAS~
 IN.....: Num (BYTE) = Number of the sound to play.                        
 OUT....: /                                                                
 EXPLAIN: Play a sound corresponding to an action.                         

:XMS_Driver
%ͻ
%                            Function XMS_Driver                            
%ͼ

 PROTOTYPE :
 Function XMS_Driver:Boolean;

 UNIT...: ~Unit MOS_XMS~
 IN.....: /                                                                
 OUT....: (BOOLEAN) = TRUE if XMS Driver exist.                            
 EXPLAIN: Test if a XMS driver exist. If the driver is installed, this     
          function load in the variable XMS_Control the correct adress     
          Be careful, this function must be called 1 time before all other 
          functions of this unit except XMS_Check.(XMS_Check, make this    
          work).                                                           
          This function set the XMS_Control var and the adress is an       
          important function for all the other XMS function                
 EXAMPLE: If XMS_Driver Then Writeln('XMS Driver Exist');                  

:XMS_ControlAddress
%ͻ
%                        Function XMS_ControlAddress                        
%ͼ

 PROTOTYPE :
 Function XMS_ControlAddress:Pointer;

 UNIT...: ~Unit MOS_XMS~
 IN.....: /                                                                
 OUT....: (POINTER) Get address of XMSControlleroller functions            
 EXPLAIN: Return a pointer to the XMS controller function                  
 EXAMPLE: P:=XMS_ControlAddress;                                           
 SEE ALSO..: 
    ~XMS_Driver~

:XMS_Version
%ͻ
%                           Function XMS_Version                            
%ͼ

 PROTOTYPE :
 Function XMS_Version:Word;

 UNIT...: ~Unit MOS_XMS~
 IN.....: /                                                                
 OUT....: (WORD) = return the version number.                              
 EXPLAIN: Return the version number of XMS driver.                         
 EXAMPLE: Writeln('XMS_Driver Version: ','XMS_Version);                    
          Writeln('HIMEM v',XMS_Version,'.',XMS_Revision);                 

:XMS_Revision
%ͻ
%                           Function XMS_Revision                           
%ͼ

 PROTOTYPE :
 Function XMS_Revision:Word;

 UNIT...: ~Unit MOS_XMS~
 IN.....: /                                                                
 OUT....: (WORD) = return the revision number.                             
 EXPLAIN: Return the revision of XMS driver.                               
 EXAMPLE: Writeln('XMS_Driver Revision: ','XMS_Version);                   
          Writeln('HIMEM v',XMS_Version,':',XMS_Revision);                 

:XMS_GetFreeMem
%ͻ
%                          Function XMS_GetFreeMem                          
%ͼ

 PROTOTYPE :
 Function XMS_GetFreeMem:Word;

 UNIT...: ~Unit MOS_XMS~
 IN.....: /                                                                
 OUT....: (WORD) = Quantity of XMS memory free in Kb.                      
 EXPLAIN: Return the quantity of free memory in Kb.                        
 EXAMPLE: Writeln('XMS free in Kb : ',XMS_GetFreeMem);                     
 NB.....: Be careful, to have the size in bytes, use this code :           
          Longint(XMS_GetFreeMem)*1024 and not XMS_GetFreeMem*1024.        

:XMS_GetLargeBlock
%ͻ
%                        Function XMS_GetLargeBlock                         
%ͼ

 PROTOTYPE :
 Function XMS_GetLargeBlock:Word;

 UNIT...: ~Unit MOS_XMS~
 IN.....: /                                                                
 OUT....: (WORD) = Size of the largest free memory block.                  
 EXPLAIN: Return the size of the biggest free memory block in Kb.          
 EXAMPLE: Writeln('XMS Largest Block: ','XMS_GetLargeBlock);               

:XMS_GetMemory
%ͻ
%                          Function XMS_GetMemory                           
%ͼ

 PROTOTYPE :
 Function XMS_GetMemory(Blocks:Word):Word;

 UNIT...: ~Unit MOS_XMS~
 IN.....: Blocks (WORD) = Nunmber of Kb to allocate.                       
 OUT....: (POINTER) = Handle of the memory allocated.                      
 EXPLAIN: Return an handle on the memory block allocated.                  
 NB.....: If there is an error, the handle is not valid.                   
 EXAMPLE: var h:TXMSHandle;                                                
              s:String[21];                                                
          h:=XMS_GetMemory((sizeof(s) div 1024)+1);                        

:XMS_FreeMemory
%ͻ
%                         Procedure XMS_FreeMemory                          
%ͼ

 PROTOTYPE :
 Procedure XMS_FreeMemory(Handle:Word);

 UNIT...: ~Unit MOS_XMS~
 IN.....: Handle (WORD) = Pointer on the bloc to free.                     
 OUT....: /                                                                
 EXPLAIN: Free a memory block allocated by XMS_GetMemory.                  
 EXAMPLE: var h:TXMSHandle;                                                
              s:String[21];                                                
          h:=XMS_GetMemory((sizeof(s) div 1024)+1);                        
          XMS_FreeMemory(h); (*Free the memory allocated*)                 

:XMS_Moveblock
%ͻ
%                          Procedure XMS_Moveblock                          
%ͼ

 PROTOTYPE :
 Procedure XMS_Moveblock(Var Movstruct:TXMSMovStruct);

 UNIT...: ~Unit MOS_XMS~
 IN.....: MovStruct (TXMSMovStruct) = Contains informations                
 OUT....: MovStruct (TXMSMovStruct) =                                      
 EXPLAIN: This procedure is used to move memory blocks from XMS or         
          conventional memory to XMS or conventional memory.               
          It's a low level procedure.                                      
          The size of amount bytes to move must be an even number.         
 NB.....: The size of the bloc must be even.                               
 EXAMPLE: Var Movinf:TXMSMovStruct                                         
              h:TXMSHandle;                                                
                                                                           
          WITH MovInf DO                                                   
           BEGIN                                                           
            Amount :=       (*Size in bytes to move*)                      
            If amount mod 2<>0 then Inc(amount); (*Even size*)             
            SourceHandle := (*handle of source block*)                     
            SourceOffset := (*offset of source block*)                     
            DestHandle   := (*Handle of target block*)                     
            DestOffset   := (*offset of target block*)                     
            END;                                                           
          XMS_Moveblock(MovInf);                                           

:XMS_LockBlock
%ͻ
%                          Procedure XMS_LockBlock                          
%ͼ

 PROTOTYPE :
 Procedure XMS_LockBlock(Handle:Word);

 UNIT...: ~Unit MOS_XMS~
 IN.....: Handle (WORD) = Pointer of the block to lock.                    
 OUT....: /                                                                
 EXPLAIN: Used to block a memory block allocated in XMS memory.            
          Then no move allowed.                                            

:XMS_UnLockBlock
%ͻ
%                         Procedure XMS_UnLockBlock                         
%ͼ

 PROTOTYPE :
 Procedure XMS_UnLockBlock(Handle:Word);

 UNIT...: ~Unit MOS_XMS~
 IN.....: Handle (WORD) = Pointer on the block to unlock.                  
 OUT....: /                                                                
 EXPLAIN: Used to unlock a memory block allocated in XMS memory.           
          This function have to be used after XMS_LockBlock.               

:XMS_Reallocate
%ͻ
%                         Procedure XMS_Reallocate                          
%ͼ

 PROTOTYPE :
 Procedure XMS_Reallocate(Handle,NewSize:Word);

 UNIT...: ~Unit MOS_XMS~
 IN.....: Handle (WORD) = Pointer on the memory block.                     
          NewSize (WORD) = New size of the bloc.                           
 OUT....: /                                                                
 EXPLAIN: Allocate again a new block of XMS memory with a new Size.        

:Test_HMA
%ͻ
%                             Function Test_HMA                             
%ͼ

 PROTOTYPE :
 Function Test_HMA:Boolean;

 UNIT...: ~Unit MOS_XMS~
 IN.....: /                                                                
 OUT....: (BOOLEAN) = TRUE if HMA exist, else FALSE.                       
 EXPLAIN: Test if the HMA memory exist or not.                             
 EXAMPLE: If Test_HMA Then Writeln('Memory HMA installed.');               

:Query_A20
%ͻ
%                            Function Query_A20                             
%ͼ

 PROTOTYPE :
 Function Query_A20:Boolean;

 UNIT...: ~Unit MOS_XMS~
 IN.....: /                                                                
 OUT....: (BOOLEAN) = True if A20 is not activated.                        
 EXPLAIN: Test if A20 is activated.                                        

:Ptr_To_Long
%ͻ
%                           Function Ptr_To_Long                            
%ͼ

 PROTOTYPE :
 Function Ptr_To_Long(P:Pointer):Longint;

 UNIT...: ~Unit MOS_XMS~
 IN.....: P (POINTER) = Pointer to convert in Longint.                     
 OUT....: (LONGINT) = Pointer tranformed.                                  
 EXPLAIN: Transform a pointer to a 32 Bits long.                           
 EXAMPLE:                                                                  

:XMS_Check
%ͻ
%                            Function XMS_Check                             
%ͼ

 PROTOTYPE :
 Function XMS_Check(I:Longint):Boolean;

 UNIT...: ~Unit MOS_XMS~
 IN.....: I (LONGINT) = Size in bytes you want to allocate.                
 OUT....: (BOOLEAN) = TRUE if it's OK, else FALSE.                         
 EXPLAIN: This function test if we can use XMS, if there is enought space  
          in XMS memory.                                                   
          It's the first and the last function to call before to use       
          XMS memory.                                                      

:XMS_GetMem
%ͻ
%                           Procedure XMS_GetMem                            
%ͼ

 PROTOTYPE :
 Procedure XMS_GetMem(Var H:TXMSHandle;size:longint);

 UNIT...: ~Unit MOS_XMS~
 IN.....: Size (LONGINT) = Size of memory to allocate.                     
 OUT....: H (TXMSHandle) = This handle will be used in another procedures. 
 EXPLAIN: It's the same like getmem for conventional memory.               
          H = a pointer to XMS memory.                                     
 SEE ALSO..: 
    ~XMS_Check~
    ~XMS_FreeMem~
    ~Ram_to_XMS~
    ~XMS_to_RAM~

:XMS_Freemem
%ͻ
%                           Procedure XMS_Freemem                           
%ͼ

 PROTOTYPE :
 Procedure XMS_Freemem(H:TXMSHandle);

 UNIT...: ~Unit MOS_XMS~
 IN.....: H (TXMSHandle) = XMS pointer.                                    
 OUT....: /                                                                
 EXPLAIN: It's the same of freemem for conventional memory                 
 SEE ALSO..: 
    ~XMS_Check~
    ~XMS_GetMem~
    ~Ram_to_XMS~
    ~XMS_to_RAM~

:RAM_To_XMS
%ͻ
%                           Procedure RAM_To_XMS                            
%ͼ

 PROTOTYPE :
 Procedure RAM_To_XMS(q:Pointer;h:TXMSHandle;size:Word);

 UNIT...: ~Unit MOS_XMS~
 IN.....: q : (POINTER) = conventional memory pointer.                     
          h : (TXMSHandle) = XMS pointer.                                  
          Size : (WORD) = Size in bytes to copy in XMS. =Sizeof(q^)        
 OUT....: /                                                                
 EXPLAIN: Copy a RAM block to XMS memory.                                  
          If the structure to copy is for example t:integer;               
          q=@t and size=sizeof(t);                                         
          This function need the varaible XMS_MoxStruct in global in this  
          unit.                                                            
 SEE ALSO..: 
    ~XMS_TO_RAM~
    ~XMS_Check~

:XMS_To_RAM
%ͻ
%                           Procedure XMS_To_RAM                            
%ͼ

 PROTOTYPE :
 Procedure XMS_To_RAM(d:Pointer;h:TXMSHandle;size:Word);

 UNIT...: ~Unit MOS_XMS~
 IN.....: d (POINTER) = conventional memory pointer                        
          h (TXMSHandle) = XMS pointer.                                    
          size (WORD) = Size in bytes to copy in RAM.                      
 OUT....: /                                                                
 EXPLAIN: This function copy a bloc from XMS to RAM.                       
 SEE ALSO..: 
    ~RAM_TO_XMS~
    ~XMS_Check~

:Put_XMSArray
%ͻ
%                          Procedure Put_XMSArray                           
%ͼ

 PROTOTYPE :
 Procedure Put_XMSArray(tab:TXMSTab;indice:longint;var v);

 UNIT...: ~Unit MOS_XMS~
 IN.....: Tab (TXMSTab) = Name of the array                                
          Indice (LONGINT) = Index in the array.                           
          V (UNTYPED) = put the variable from V to XMS.                    
 OUT....: /                                                                
 EXPLAIN: The array will be fill with the contain of V                     
 SEE ALSO..: 
    ~Init_XMSArray~
    ~Get_XMSArray~

:XMS_GetImage
%ͻ
%                          Procedure XMS_GetImage                           
%ͼ

 PROTOTYPE :
 Procedure XMS_GetImage(x1, y1, x2, y2: Integer; var BitMap:TXMSBitmap);

 UNIT...: ~Unit MOS_XMS~
 IN.....: x1,y1,x2,y2 (INTEGER) = Box where to get the image               
 OUT....: Bitmap (TXMSBitmap) = The contain of the image                   
 EXPLAIN: It's like an VESA_GetImage but for XMS memory.                   
          If an error occurs, Bitmap.Qtts:=0.                              
 BUGS...: If the size of the picture = 65535 bytes (Set_Even(Size))        
 SEE ALSO..: 
    ~VESA_GetImage~
    ~XMS_Putimage~
    ~XMSFreeBitmap~

:XMS_PutImage
%ͻ
%                          Procedure XMS_PutImage                           
%ͼ

 PROTOTYPE :
 Procedure XMS_PutImage(X, Y: Integer; var BitMap:TXMSBitmap; BitBlt: Word);

 UNIT...: ~Unit MOS_XMS~
 IN.....: X,Y (INTEGER) = Where to put the image.                          
          BitMap (TXMSBitmap) = Image                                      
          BitBlt = Normalput,xorput,notput... (c.f.PutImage)               
 OUT....: /                                                                
 EXPLAIN: You must make a XMS_GetImage before XMS_PutImage.                
 SEE ALSO..: 
    ~VESA_PutImage~
    ~XMS_GetImage~
    ~XMS_FreeBitmap~

:XMS_FreeBitmap
%ͻ
%                         Procedure XMS_FreeBitmap                          
%ͼ

 PROTOTYPE :
 Procedure XMS_FreeBitmap(Bitmap:TXMSBitmap);

 UNIT...: ~Unit MOS_XMS~
 IN.....: Bitmap (XMSBITMAP) = Image captured.                             
 OUT....: /                                                                
 EXPLAIN: Free memory allocated on the XMS_GetImage.                       
          Don't forget to free the XMS memory allocated, and use this      
          procedure for that.                                              
 SEE ALSO..: 
    ~XMS_GetImage~

:XMS_StackInit
%ͻ
%                          Function XMS_StackInit                           
%ͼ

 PROTOTYPE :
 Function XMS_StackInit(Var Stack:TXMSStack;ItemSize:Word;QttMax:Longint):
          Boolean;

 UNIT...: ~Unit MOS_XMS~
 IN.....: Stack (TXMSSTACK) = Stack Structure                              
          ItemSize (WORD) = Size of an Item                                
          QttMax (LONGINT) = Maximum quantity of items                     
 OUT....: (BOOLEAN) = TRUE if all is OK, FALSE if not enougth memory       
 EXPLAIN: Create a stack of items in XMS memory. You fixe the size of the  
          item with ItemSize and the size of the stack with QttMax.        
          Don't forget to kill the stack after use.                        
 EXAMPLE: Var S:Stack;St:String;                                           
          XMS_StackInit(S,Sizeof(St),20); Create a stack witch can contain 
                                          20 strings.                      
 SEE ALSO..: 
    ~XMS_StackKill~
    ~XMS_StackPush~
    ~XMS_StackPop~
    ~XMS_StackTestEmpty~

:XMS_StackKill
%ͻ
%                          Procedure XMS_StackKill                          
%ͼ

 PROTOTYPE :
 Procedure XMS_StackKill(Var Stack:TXMSStack);

 UNIT...: ~Unit MOS_XMS~
 IN.....: Stack (TXMSSTACK) = Stack Structure                              
 OUT....: /                                                                
 EXPLAIN: Kill the stack and free allocated memory.                        
 SEE ALSO..: 
    ~XMS_StackInit~

:XMS_StackPush
%ͻ
%                          Function XMS_StackPush                           
%ͼ

 PROTOTYPE :
 Function XMS_StackPush(Var Stack:TXMSStack;Var V):Boolean;

 UNIT...: ~Unit MOS_XMS~
 IN.....: Stack (TXMSSTACK) = Stack Structure                              
          V (UNTYPED) = Variable witch contain one item.                   
 OUT....: (BOOLEAN) = TRUE if all is OK, FALSE if the stack is full.       
 EXPLAIN: Push on the stack an item.                                       
 SEE ALSO..: 
    ~XMS_StackPop~
    ~XMS_StackInit~

:XMS_StackPop
%ͻ
%                           Function XMS_StackPop                           
%ͼ

 PROTOTYPE :
 Function XMS_StackPop(Var Stack:TXMSStack;Var V):Boolean;

 UNIT...: ~Unit MOS_XMS~
 IN.....: Stack (TXMSSTACK) = Stack Structure                              
          V (UNTYPED) = Variable where to put the item.                    
 OUT....: (BOOLEAN) = TRUE if all is OK, FALSE if the stack is empty.      
 EXPLAIN: Pop on the stack an item.                                        
 SEE ALSO..: 
    ~XMS_StackPush~
    ~XMS_StackInit~

:XMS_StackTestEmpty
%ͻ
%                        Function XMS_StackTestEmpty                        
%ͼ

 PROTOTYPE :
 Function XMS_StackTestEmpty(Stack:TXMSStack):Boolean;

 UNIT...: ~Unit MOS_XMS~
 IN.....: Stack (TXMSSTACK) = Stack Structure                              
 OUT....: (BOOLEAN) = TRUE if the stack is empty, else FALSE.              
 EXPLAIN: Test if the stack is empty or not.                               
 SEE ALSO..: 
    ~XMS_StackInit~

:XMS_GetHandle
%ͻ
%                          Function XMS_GetHandle                           
%ͼ

 PROTOTYPE :
 Function XMS_GetHandle:Byte;

 UNIT...: ~Unit MOS_XMS~
 IN.....: /                                                                
 OUT....: (BYTE) = Number of handles free.                                 
 EXPLAIN: Answer this question : How many handles are free?                

:Set_Even
%ͻ
%                             Function Set_Even                             
%ͼ

 PROTOTYPE :
 Function Set_Even(L:longint):longint;

 UNIT...: ~Unit MOS_XMS~
 IN.....: L : (LONGINT) = a number                                         
 OUT....: (LONGINT) an even number                                         
 EXPLAIN: If L is even, the return is L, else the return is L+1.           
 EXAMPLE: Set_Even(3)=4                                                    
          Set_Even(4)=4                                                    
          Set_Even(10001)=10002                                            

:Set_Env
%ͻ
%                             Procedure Set_Env                             
%ͼ

 PROTOTYPE :
 Procedure Set_Env(EnvVar,Value:String);

 UNIT...: ~Unit MOS_DSK~
 IN.....: EnvVar (STRING) = Variable of the DOS environment to set         
          Value (STRING) = Value of the variable.                          
 OUT....: /                                                                
 EXPLAIN: Set a string to the DOS environment.                             
          It's the same as SET VAR=VALUE under a dos shell.                
          The effect is only after the end of the program.                 
 CF.....: EnvStr of tp7.                                                   

:Win_Init
%ͻ
%                            Procedure Win_Init                             
%ͼ

 PROTOTYPE :
 Procedure Win_Init(X1,Y1,X2,Y2:Integer; IDCMP:Word; Name:String; Var W:
           TWindow);

 UNIT...: ~Unit MOS_WIN~
 IN.....: X1,Y1,X2,Y2 (INTEGER) = Window coordinates                       
          IDCMP (WORD) = IDCMP Flags :                                     
            Bit 0  $0001 = Activated      1 = Window Activated             
            Bit 1  $0002 = Extended       1 = Enable Extend                
            Bit 2  $0004 = Size           1 = Enable Resize                
            Bit 3  $0008 = Swap           1 = Enable window Swapping       
            Bit 4  $0010 = Close          1 = Enable Close window          
            Bit 5  $0020 = Backdrop       1 = Window always on back        
            Bit 6  $0040 = Block          1 = Window limited on screen     
            Bit 7  $0080 = Title          1 = Display window title         
            Bit 8  $0100 = Border         1 = Display window borders       
            Bit 9  $0200 = Cursor         1 = Mannage window cursor        
            Bit 10 $0400 = Loked          1 = Window status locked         
            Bit 11 $0800 = Sensitive      1 = Active window is mouse over  
            Bit 12 $1000 = Multi-Windows  1 = Modale window                
            Bit 13 $2000 = Transparent    1 = Transparent background       
            Bit 14 $4000 = Move           1 = Enable window deplacement    
            Bit 15 $8000 = Relief         1 = Reliefs borders              
          Name (STRING) = Window title.                                    
          W (TWindow) = Pointer to the window structure.                   
 EXPLAIN: Initialise the window structure.                                 
 OUT....: /                                                                
 EXAMPLE: Win_Init(10,50,450,180,$13DE,'My Window',Win1);                  

:Win_Sup
%ͻ
%                             Procedure Win_Sup                             
%ͼ

 PROTOTYPE :
 Procedure Win_Sup(Xu,Yu,Xv,Yv,XMin,YMin,XMax,YMax,BarSld,Coul:Integer; IDRES
           :Word; Var W:TWindow);

 UNIT...: ~Unit MOS_WIN~
 IN.....: Xu,Yu,Xv,Yv (INTEGER) = Coordinates for extended window .        
          X1,Y1,X2,Y2 (INTEGER) = Window minimum and maximum size.         
          BarSld (INTEGER) = Numbers and positions for the windows sliders.
             0 = No sliders                                                
             1 = Vertical Slider                                           
             2 = Horizontal Slider                                         
             3 = Horizontal + vertical Slider                              
          Coul (INTEGER) = Window background color.                        
          W (TWindow) = Pointer to the window structure.                   
 EXPLAIN: Initialise more parameters for the window.                       
 OUT....: /                                                                
 NB.....: This procedure must be always called after "Win_Init".           
          If you want to have a color fade in your window title,           
          you must call this procedure to define palette.                  
 EXAMPLE: Win_Sup(0,0,200,100,80,50,530,200,3,Col5,Win1);                  

:Win_Kill
%ͻ
%                            Procedure Win_Kill                             
%ͼ

 PROTOTYPE :
 Procedure Win_Kill(Var W:TWindow);

 UNIT...: ~Unit MOS_WIN~
 IN.....: W (TWindow) = Pointer to the window structure.                   
 EXPLAIN: Kill the window (Destroy the structure).                         
 OUT....: /                                                                
 EXAMPLE: Win_Kill(W);                                                     

:Win_Draw
%ͻ
%                            Procedure Win_Draw                             
%ͼ

 PROTOTYPE :
 Procedure Win_Draw(Var W:TWindow);

 UNIT...: ~Unit MOS_WIN~
 IN.....: W (TWindow) = Pointer to the window structure.                   
 OUT....: /                                                                
 EXPLAIN: Draw the window previously defined.                              
 EXAMPLE: Win_Draw(W);                                                     

:Win_Test
%ͻ
%                             Function Win_Test                             
%ͼ

 PROTOTYPE :
 Function Win_Test(Var W:TWindow):Integer;

 UNIT...: ~Unit MOS_WIN~
 IN.....: W (TWindow) = Pointer to the window structure.                   
 OUT....: Val (INTEGER) = Return an even else 0 if nothing happens.        
                         1 = Gadget Close Window Activated. (*)            
                         2 = Gadget Swap Window Activated.                 
                         3 = Gadget Extend Window Activated (New Size,Pos).
                         4 = Gadget Resize Window Activated.               
                         5 = Window Activated.                             
                         6 = Window Inactivated.                           
                Canceled 8 = Window has been Swapped and may be Refreshed. 
                         9 = Window has been Moved.                        
               Canceled 10 = Font has been Changed.                        
 EXPLAIN: Manage windows events (Activation, Close, Extend...).            
 EXAMPLE: Even:=Win_Test(W);                                               
          If Even=1 Then....[Window closed];                               

:Win_Clip
%ͻ
%                            Procedure Win_Clip                             
%ͼ

 PROTOTYPE :
 Procedure Win_Clip(Clip:Boolean; Var W:TWindow);

 UNIT...: ~Unit MOS_WIN~
 IN.....: Clip (BOOLEAN) = Clipping Status (TRUE = Clip window).           
          W (TWindow) = Pointer to the window structure.                   
 OUT....: /                                                                
 EXPLAIN: Enable or disable the window clipping.                           
 EXAMPLE: Win_Clip(TRUE,W);                                                
 NB.....: When you display or test gadgets, the clipping must be set.      

:Win_Zoom
%ͻ
%                            Procedure Win_Zoom                             
%ͼ

 PROTOTYPE :
 Procedure Win_Zoom(Mode:Boolean; Var W:TWindow);

 UNIT...: ~Unit MOS_WIN~
 IN.....: Mode (BOOLEAN) = FALSE = Zoom In, TRUE = Zoom Out.               
          W (TWindow) = Pointer to the window structure.                   
 EXPLAIN: Made a Zoom on a window. Zoom center is set on the mouse position
 OUT....: /                                                                
 EXAMPLE: Win_Zoom(W);                                                     

:Win_IdCmp
%ͻ
%                            Procedure Win_IdCmp                            
%ͼ

 PROTOTYPE :
 Procedure Win_IdCmp(IDCMP:Word; Var W:TWindow);

 UNIT...: ~Unit MOS_WIN~
 IN.....: IDCMP (WORD) = New IDCMP flags.                                  
          W (TWindow) = Pointer to the window structure.                   
 OUT....: /                                                                
 EXPLAIN: Set new IDCMP flags for a window.                                
 EXAMPLE: Win_IdCmp($47DE,W1);                                             

:Win_IdRes
%ͻ
%                            Procedure Win_IdRes                            
%ͼ

 PROTOTYPE :
 Procedure Win_IdRes(IDRES:Word; Var W:TWindow);

 UNIT...: ~Unit MOS_WIN~
 IN.....: IDRES (WORD) = New IDRES flags.                                  
          W (TWindow) = Pointer to the window structure.                   
 OUT....: /                                                                
 EXPLAIN: Set new IDRES flags for a window.                                
 EXAMPLE: Win_IdRes($0003,W);                                              

:Win_Clear
%ͻ
%                            Procedure Win_Clear                            
%ͼ

 PROTOTYPE :
 Procedure Win_Clear(Var W:TWindow);

 UNIT...: ~Unit MOS_WIN~
 IN.....: W (TWindow) = Pointer to the window structure.                   
 OUT....: /                                                                
 EXPLAIN: Clear the window (as a Clrscr).                                  
 EXAMPLE: Win_Clear(W);                                                    

:Win_Rename
%ͻ
%                           Procedure Win_Rename                            
%ͼ

 PROTOTYPE :
 Procedure Win_Rename(NewName:String; Var W:TWindow);

 UNIT...: ~Unit MOS_WIN~
 IN.....: W (TWindow) = Pointer to the window structure.                   
          NewName (STRING) = New title.                                    
 OUT....: /                                                                
 EXPLAIN: Rename window title.                                             
 EXAMPLE: Win_Rename('I WANT SOME GIRLS',W);                               
 NB.....: The window must have his title displayed.                        

:Win_TitleShade
%ͻ
%                         Procedure Win_TitleShade                          
%ͼ

 PROTOTYPE :
 Procedure Win_TitleShade(W:TWindow);

 UNIT...: ~Unit MOS_WIN~
 IN.....: W (TWindow) = Pointer to the window structure.                   
 EXPLAIN: Initialise window title shade.                                   
 OUT....: /                                                                

:Win_Ready
%ͻ
%                            Function Win_Ready                             
%ͼ

 PROTOTYPE :
 Function Win_Ready(Var W:TWindow):Boolean;

 UNIT...: ~Unit MOS_WIN~
 IN.....: W (TWindow) = Pointer to the window structure.                   
 OUT....: (BOOLEAN) = TRUE = Window is ready (Gadgets can be tested).      
 EXPLAIN: Return TRUE if the window is ready.                              
 EXAMPLE: If Win_Ready(W) Then Begin End;                                  

:Req_Calculator
%ͻ
%                          Function Req_Calculator                          
%ͼ

 PROTOTYPE :
 Function Req_Calculator(X1,Y1:Integer; Title:String):String;

 UNIT...: ~Unit MOS_REQ~
 IN.....: X1,Y1 (INTEGER) = Calculator position on screen.                 
        : Title (STRING) = Calculator title.                               
 OUT....: (STRING) = Result string.                                        
 EXPLAIN: Display a Calculator on screen (Model Casio 8000G).              
 SEE ALSO..: 
    ~Solve~

:Req_Font
%ͻ
%                            Procedure Req_Font                             
%ͼ

 PROTOTYPE :
 Procedure Req_Font(Px,Py:Integer; Title:String; Var FntType:String; Var 
           FntSize:Integer);

 UNIT...: ~Unit MOS_REQ~
 IN.....: Px,Py (INTEGER) = Requester position.                            
          Title (STRING) = The window title.                               
          FntType (STRING) = Set Font filename.                            
          FntSize (INTEGER) = Set Font filesize.                           
 OUT....: FntType (STRING) = Get Font filename.                            
          FntSize (INTEGER) = Get Font filesize.                           
 NB.....: If no font selected then FntType='' and FntSize=0.               
 EXPLAIN: Display a Font requester. Allow you to select a font from the    
          Font directory.                                                  
 EXAMPLE: Req_Font(200,100,'CHOOSE YOUR FONT',FType,FSize);                

:Req_Palette
%ͻ
%                           Procedure Req_Palette                           
%ͼ

 PROTOTYPE :
 Procedure Req_Palette(X1,Y1:Integer; Name:String; Mode:Byte; Var NUM:Integer
           );

 UNIT...: ~Unit MOS_REQ~
 IN.....: X1,Y1 (INTEGER) = Requester coordinates.                         
          Name (STRING) = Window name.                                     
          Mode (BYTE) = (0=palette modification, 1=color selection).       
 OUT....: Num (SHORTINT) = Selected color number.                          
 EXPLAIN: Display a "Palette" or "Color Selection" requester.              
 EXAMPLE: Req_Palette(100,50,'Please Select your Palette',0,NUM);          

:Req_Pattern
%ͻ
%                           Procedure Req_Pattern                           
%ͼ

 PROTOTYPE :
 Procedure Req_Pattern(X1,Y1:Integer; Name:String; Var NUM:Integer);

 UNIT...: ~Unit MOS_REQ~
 IN.....: X1,Y1 (INTEGER) = Requester coordinates.                         
          Name (STRING) = Window name.                                     
 OUT....: Num (SHORTINT) = Selected pattern number.                        
 EXPLAIN: Display and manage a "Pattern" requester.                        
 EXAMPLE: Req_Pattern(100,50,'Please select a pattern...',Num);            

:Req_Progress
%ͻ
%                          Procedure Req_Progress                           
%ͼ

 PROTOTYPE :
 Procedure Req_Progress(Name,Explain:String; Val,CoB:Integer; Var P:TProgress
           );

 UNIT...: ~Unit MOS_REQ~
 IN.....: Name (STRING) = The window title.                                
          Explain (STRING) = An explanation phrase to describe the process.
          Val (INTEGER) = Percentage value (0-100%).                       
          CoB (INTEGER) = The fill bar color.                              
          P (TPROGRESS) = Pointer to the TProgress structure.              
 OUT....: /                                                                
 EXPLAIN: Display and manage a Progress requester.                         
 NB.....: If the "Val" variable is set to 0, the requester is opened,      
          and, with the value 100, the requester is closed.                
          If the "Abort" Button is pressed, the "Abort" field is TRUE.     
 EXAMPLE: CountP:=0;                                                       
          Repeat                                                           
             Str(CountP,CountS);                                           
             Req_Progress('Process...','Crunched '+CountS,CountP,12,Pro1); 
             Delay(15); Inc(CountP);                                       
          Until (Pro1.Abort=True) Or (CountP>100);                         

:Req_ProgressInit
%ͻ
%                        Procedure Req_ProgressInit                         
%ͼ

 PROTOTYPE :
 Procedure Req_ProgressInit(Var P:TProgress);

 UNIT...: ~Unit MOS_REQ~
 IN.....: P (TPROGRESS) = Pointer to the TProgress structure.              
 OUT....: /                                                                
 EXPLAIN: Initialise a Progress requester.                                 

:Req_DisplayWinBMP
%ͻ
%                        Procedure Req_DisplayWinBMP                        
%ͼ

 PROTOTYPE :
 Procedure Req_DisplayWinBMP(Px,Py:Integer; FName:String);

 UNIT...: ~Unit MOS_REQ~
 IN.....: X1,Y1 (INTEGER) = Image position on screen.                      
        : FName (STRING) = BMP filename to display.                        
 OUT....: /                                                                
 EXPLAIN: Display a BMP in a child window.                                 
 SEE ALSO..: 
    ~Show_BMP~
    ~Test_BMP~

:Req_Register
%ͻ
%                          Procedure Req_Register                           
%ͼ

 PROTOTYPE :
 Procedure Req_Register;

 UNIT...: ~Unit MOS_REQ~
 IN.....: /                                                                
 OUT....: /                                                                
 EXPLAIN: Display the MOS Register request (Must be in 256 color mode).    

:Req_DisplayClock
%ͻ
%                        Procedure Req_DisplayClock                         
%ͼ

 PROTOTYPE :
 Procedure Req_DisplayClock(X1,Y1,X2,Y2,Co:Integer; State:Byte; Var T:TClock;
            W:TWindow);

 UNIT...: ~Unit MOS_REQ~
 IN.......: X1,Y1,X2,Y2 (INTEGER) = Coordinates of the clock box.          
            Co (INTEGER) = Clock color.                                    
            State (BYTE) = Clock state (0 = Initialisation, 1 = Test).     
            T (TClock) = Pointer to a "TClock" structure.                  
            W (TWindow) = Pointer to a window structure.                   
 OUT......: /                                                              
 EXPLAIN..: Display and manage a classical clock in a box.                 

:Net_Main
%ͻ
%                            Procedure Net_Main                             
%ͼ

 PROTOTYPE :
 Procedure Net_Main(Px,Py:Integer);

 UNIT...: ~Unit MOS_REQ~
 IN.....: Px,Py (INTEGER) = Requester position on screen.                  
 OUT....: /                                                                
 EXPLAIN: Display and manage the main Network requester.                   

:Net_ServerInfos
%ͻ
%                         Procedure Net_ServerInfos                         
%ͼ

 PROTOTYPE :
 Procedure Net_ServerInfos(Px,Py:Integer);

 UNIT...: ~Unit MOS_REQ~
 IN.....: Px,Py (INTEGER) = Requester position on screen.                  
 OUT....: /                                                                
 EXPLAIN: Get information about the NOVELL Netware server.                 

:Net_Login
%ͻ
%                            Procedure Net_Login                            
%ͼ

 PROTOTYPE :
 Procedure Net_Login(Px,Py:Integer);

 UNIT...: ~Unit MOS_REQ~
 IN.....: Px,Py (INTEGER) = Requester position on screen.                  
 OUT....: /                                                                
 EXPLAIN: Get a login requester (Using NOVELL Netware).                    
 NB.....: Not currently operational.                                       

:Net_Connection
%ͻ
%                         Procedure Net_Connection                          
%ͼ

 PROTOTYPE :
 Procedure Net_Connection(Px,Py:Integer);

 UNIT...: ~Unit MOS_REQ~
 IN.....: Px,Py (INTEGER) = Requester position on screen.                  
 OUT....: /                                                                
 EXPLAIN: Get information about the connected user.                        

:Net_SessionUserList
%ͻ
%                       Function Net_SessionUserList                        
%ͼ

 PROTOTYPE :
 Function Net_SessionUserList(Px,Py,Mode:Integer):Integer;

 UNIT...: ~Unit MOS_REQ~
 IN.....: Px,Py (INTEGER) = Requester position on screen.                  
          Mode (INTEGER) = ?                                               
 OUT....: /                                                                
 EXPLAIN: Get connected users on a NOVELL Network.                         

:Net_Messages
%ͻ
%                          Procedure Net_Messages                           
%ͼ

 PROTOTYPE :
 Procedure Net_Messages(Px,Py:Integer);

 UNIT...: ~Unit MOS_REQ~
 IN.....: Px,Py (INTEGER) = Requester position on screen.                  
 OUT....: /                                                                
 EXPLAIN: Enable user to send messages using a NOVELL Network.             

:RFindFirst
%ͻ
%                           Procedure RFindFirst                            
%ͼ

 PROTOTYPE :
 Procedure RFindFirst(Path,Mask:String; Attr: Word; var F: TRSearchRec);

 UNIT...: ~Unit MOS_FIL~
 IN.....: Path (STRING) = Where to begin the search                        
          Mask (STRING) = '*.*' or '*.pas' for example...                  
          Attr (WORD) = AnyFile, ReadOnly....                              
 OUT....: F (TRSEARCHREC) =                                                
 EXPLAIN: This procedure is the first to call if you want to get all the   
          file of the directory path and all the files of the              
          sub-directories.                                                 
 EXAMPLE: var D:TRSearchRec;                                               
          begin                                                            
          RFindFirst(PathG,Mask,AnyFile,D);                                
          While Not RFindEnd(D) Do                                         
            Begin                                                          
            Writeln(D.FileName);                                           
            RFindNext(D);                                                  
            End;                                                           
          RFindDone(D);                                                    
          end.                                                             
 NB.....: Don't forget to use RFindDone when the search is finished.       
 CF.....: FindFirst from Tp7                                               
 SEE ALSO..: 
    ~RFindFirst~
    ~RFindNext~
    ~RFindEnd~
    ~RFindDone~
    ~TRSearchRec~

:RFindNext
%ͻ
%                            Procedure RFindNext                            
%ͼ

 PROTOTYPE :
 Procedure RFindNext(var F: TRSearchRec);

 UNIT...: ~Unit MOS_FIL~
 IN.....: /                                                                
 OUT....: F (TRSEARCHREC) = Return this record in result                   
 EXPLAIN: Search the next file.                                            
 CF.....: FindNext from Tp7                                                
 SEE ALSO..: 
    ~RFindFirst~

:RFindDone
%ͻ
%                            Procedure RFindDone                            
%ͼ

 PROTOTYPE :
 Procedure RFindDone(var F: TRSearchRec);

 UNIT...: ~Unit MOS_FIL~
 IN.....: F (TRSEARCHREC) = Input record                                   
 OUT....: /                                                                
 EXPLAIN: Finish the work of RFindFirst                                    
          Don't forget to call it after the use of RFindFirst              
 SEE ALSO..: 
    ~RFindFirst~

:RFindEnd
%ͻ
%                             Function RFindEnd                             
%ͼ

 PROTOTYPE :
 Function RFindEnd(Var F: TRSearchRec):Boolean;

 UNIT...: ~Unit MOS_FIL~
 IN.....: F (TRSEARCHREC) = Input Record                                   
 OUT....: (BOOLEAN) = True if it is the last file, else False              
 EXPLAIN: Usefull to make a while loop                                     
 SEE ALSO..: 
    ~RFindFirst~



:Stack_Init
%ͻ
%                            Function Stack_Init                            
%ͼ

 PROTOTYPE :
 Function Stack_Init(Var Stack:TStack;ItemSize:Word;QttMax:Word):Boolean;

 UNIT...: ~Unit MOS_MEM~
 IN.....: Stack (TSTACK) = Stack Structure                                 
          ItemSize (WORD) = Size of an Item                                
          QttMax (WORD) = Maximum quantity of items                        
 OUT....: (BOOLEAN) = TRUE if all is OK, FALSE if not enougth memory       
 EXPLAIN: Create a stack of items. You fixe the size of the item with      
          ItemSize and the size of the stack with QttMax.                  
          Don't forget to kill the stack after use.                        
 EXAMPLE: Var S:Stack;St:String;                                           
          Stack_Init(S,Sizeof(St),20); Create a stack witch can contain    
                                       20 strings.                         
 SEE ALSO..: 
    ~Stack_Kill~
    ~Stack_Push~
    ~Stack_Pop~
    ~Stack_TestEmpty~
    ~Stack_Read~

:Stack_Kill
%ͻ
%                           Procedure Stack_Kill                            
%ͼ

 PROTOTYPE :
 Procedure Stack_Kill(Var Stack:TStack);

 UNIT...: ~Unit MOS_MEM~
 IN.....: Stack (TSTACK) = Stack Structure                                 
 OUT....: /                                                                
 EXPLAIN: Kill the stack and free allocated memory.                        
 SEE ALSO..: 
    ~Stack_Init~

:Stack_Push
%ͻ
%                            Function Stack_Push                            
%ͼ

 PROTOTYPE :
 Function Stack_Push(Var Stack:TStack;Var V):Boolean;

 UNIT...: ~Unit MOS_MEM~
 IN.....: Stack (TSTACK) = Stack Structure                                 
          V (UNTYPED) = Variable witch contain one item.                   
 OUT....: (BOOLEAN) = TRUE if all is OK, FALSE if the stack is full.       
 EXPLAIN: Stack_Push on the stack an item.                                 
 SEE ALSO..: 
    ~Stack_Pop~
    ~Stack_Init~

:Stack_Pop
%ͻ
%                            Function Stack_Pop                             
%ͼ

 PROTOTYPE :
 Function Stack_Pop(Var Stack:TStack;Var V):Boolean;

 UNIT...: ~Unit MOS_MEM~
 IN.....: Stack (TSTACK) = Stack Structure                                 
          V (UNTYPED) = Variable where to put the item.                    
 OUT....: (BOOLEAN) = TRUE if all is OK, FALSE if the stack is empty.      
 EXPLAIN: Stack_Pop on the stack an item.                                  
 SEE ALSO..: 
    ~Stack_Push~
    ~Stack_Init~

:Stack_TestEmpty
%ͻ
%                         Function Stack_TestEmpty                          
%ͼ

 PROTOTYPE :
 Function Stack_TestEmpty(Stack:TStack):Boolean;

 UNIT...: ~Unit MOS_MEM~
 IN.....: Stack (TSTACK) = Stack Structure                                 
 OUT....: (BOOLEAN) = TRUE if the stack is empty, else FALSE.              
 EXPLAIN: Test if the stack is empty or not.                               
 SEE ALSO..: 
    ~Stack_Init~

:Stack_TestFull
%ͻ
%                          Function Stack_TestFull                          
%ͼ

 PROTOTYPE :
 Function Stack_TestFull (Stack:TStack):Boolean;

 UNIT...: ~Unit MOS_MEM~
 IN.....: Stack (TSTACK) = Stack Structure                                 
 OUT....: (BOOLEAN) = TRUE if the stack is full, else FALSE.               
 EXPLAIN: Test if the stack is full or not.                                
 SEE ALSO..: 
    ~Stack_Init~

:Stack_Read
%ͻ
%                           Procedure Stack_Read                            
%ͼ

 PROTOTYPE :
 Procedure Stack_Read(Stack:TStack;Num:Word;Var V);

 UNIT...: ~Unit MOS_MEM~
 IN.....: Stack (TSTACK) = Stack Structure                                 
          Num (WORD) = N of the item to read.                             
 OUT....: V (UNTYPED) = Variable wehre to put the item.                    
 EXPLAIN: Read one item of the stack.                                      
          The first item is the 1.                                         
 EXAMPLE: if the stack is like this :        Stack_Read(S,1,V)             
          Item 3                             returns in V Item 1.          
          Item 2                                                           
          Item 1                                                           
 SEE ALSO..: 
    ~Stack_Init~


