{ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»
 Ί                              EXAMPLE SOURCE                               Ί
 ΜΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΉ
 Ί                  To be used with MOS v3.0 Professional GUI                Ί
 ΜΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΉ
 Ί Coded by Zuul as BouFFtou as Cheveau Fr‚d‚ric.                            Ί
 Ί Source Turbo Pascal v7.00 generated by MRE (MOS Resource Editor) v2.8.    Ί
 Ί Contact us on MOS Home's Page - http://www.multimania.com/mos             Ί
 ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ}

{$M 65500,0,365520}                     {*Stack And Heap*}

Program Menu;                           {*Program Name*}

Uses Dos,                               {*Unit BP7 DOS*}
     MOS_VESA,MOS_DEB,                  {*Manage VESA and debug*}
     MOS_STR, MOS_BLK,                  {*Manage Strings and blankers*}
     MOS_CRT, MOS_BAS,                  {*Manage Initialisations and CRT*}
     MOS_ASM, MOS_MSE,                  {*Manage Assembler and Mouse*}
     MOS_IPX, MOS_XMS,                  {*Manage Networks and XMS Memory*}
     MOS_TOO, MOS_GAD,                  {*Manage Tools and Gadgets*}
     MOS_GFX, MOS_BMP,                  {*Manage Graphics and BMP*}
     MOS_WIN, MOS_MEN,                  {*Manage Windows and Menus*}
     MOS_WAV, MOS_VAR,                  {*Manage WAV Sounds*}
     MOS_DIR, MOS_SYS,                  {*Manage Disk and System*}
     MOS_TSK, MOS_LIS,                  {*Manage Tasks and Lists*}
     MOS_EZR, MOS_GPH,                  {*Manage Dialogs and Graph*}
     MOS_KBD, MOS_DSK,                  {*Manage Keyboard and Disk*}
     MOS_REQ, MOS_SWAP;                 {*Manage Requesters and Swap Disk*}

{ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»
 Ί                             PROCEDURE Main                                Ί
 ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ}

Procedure Main;
Var XOk,XCancel   :Boolean;             {*Exit Flags*}
    Menu          :TMenu;               {*Variable Menu*}
    MS,PS,SS      :Byte;                {*Manage Menus*}
    Num           :Integer;

{************************* DISPLAY WINDOW CONTENT ***************************}

Procedure DECLARE_MENU;
Var A:Integer;                          {*Loop*}

Begin
Menu_Clear(Menu);                       {*Prepare Menus Arrays*}
For A:=1000 to 1011 do Menu_Add(Menu,1,A-999, Loc(A));
For A:=1015 to 1020 do Menu_Add(Menu,2,A-1014,Loc(A));
For A:=1025 to 1029 do Menu_Add(Menu,3,A-1024,Loc(A));
For A:=1035 to 1038 do Menu_Add(Menu,4,A-1034,Loc(A));
For A:=1045 to 1048 do Menu_Add(Menu,5,A-1044,Loc(A));
For A:=1050 to 1055 do Menu_Add(Menu,6,A-1049,Loc(A));
End;

{***************************** MAIN PROCEDURE *******************************}

Begin
Num:=4;
Req_Dialog('INFORMATION','FIRST CLOSE THIS DIALOG BOX,|THEN CLICK ON THE RIGHT MOUSE BUTTON TO ACCESS MENU|'+
           'AND SELECT EXIT POINT TO QUIT THE DEMO.','   _OK   ',Num);

DECLARE_MENU;                           {*Menus Declarations*}
XOk:=FALSE; XCancel:=FALSE;

Repeat
Menu_Test(Menu,1,15,MS,PS,SS);          {*Menu Test*}
Case MS of
   1: Case PS of                        {*Menu 1 Test points...*}
      11 : XOk:=TRUE;
      End;
   End;

Until (XOk) Or (XCancel);               {*Exit Flags*}
End;

{ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»
 Ί                        MAIN PROGRAM (INITIALISATIONS)                     Ί
 ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ}

Begin
INIT_BASE;                               {*Initialise Hardware*}
INIT_SCREEN;                            {*Initialise Screen*}
INIT_MOUSE;                             {*Initialise Mouse*}

Oldexit:=ExitProc;                      {*Intercept Errors*}
SetJump(MyAddr);
ExitProc:=@ENTRY_INT24;

Main;                                   {*Call Menu Management*}

DONE_MOUSE;                             {*Restore Mouse*}
DONE_SCREEN;                            {*Restore Screen*}
DONE_BASE;                               {*Restore Hardware*}
End.
