Списки в оперативній пам'яті, операції над списками. Керування програмами. Керування таймером. Системні керуючі блоки. Управління пам’яттю: таблиця векторів переривань, страница 10

                          asm mov ax,0x5801

                          asm mov bx,0x0002// LAST_FIT_LOW

                          asm int 0x21

                          break;}

             case 3:{

                          asm xor bx,bx

                          asm xor ax,ax

                          asm mov ax,0x5801

                          asm mov bx,0x0080// FIRST_FIT_HIGH

                          asm int 0x21

                          break;}

             case 4:{

                          asm xor bx,bx

                          asm xor ax,ax

                          asm mov ax,0x5801

                          asm mov bx,0x0081// BEST_FIT_HIGH

                          asm int 0x21

                          break;}

             case 5:{

                          asm xor bx,bx

                          asm xor ax,ax

                          asm mov ax,0x5801

                          asm mov bx,0x0082// LAST_FIT_HIGH

                          asm int 0x21

                          break;}

             case 6:{

                          asm xor bx,bx

                          asm xor ax,ax

                          asm mov ax,0x5801

                          asm mov bx,0x0040// FIRST_FIT_HIGHONLY

                          asm int 0x21

                          break;}

             case 7:{

                          asm xor bx,bx

                          asm xor ax,ax

                          asm mov ax,0x5801

                          asm mov bx,0x0041// BEST_FIT_HIGHONLY

                          asm int 0x21

                          break;}

             case 8:{

                          asm xor bx,bx

                          asm xor ax,ax

                          asm mov ax,0x5801

                          asm mov bx,0x0042// LAST_FIT_HIGHONLY

                          asm int 0x21

                          break;}

             default:{return;}}}

void  Get_Strategy()

{

       unsigned int strategy(0);

       asm xor ax, ax

       asm mov ax, 0x5800

       asm int 0x21

       asm mov strategy, ax

       switch (strategy)

       {

             case 0x0:{

                          cout << "FIRST_FIT_LOW" << endl;

                          break;}

             case 0x0001:{

                          cout << " BEST_FIT_LOW" << endl;

                          break;}

             case 0x0002:{

                          cout << " LAST_FIT_LOW" << endl;

                          break;}

             case 0x0080:{

                          cout << "FIRST_FIT_HIGH" << endl;

                          break;}

             case 0x0081:{

                          cout << "BEST_FIT_HIGH" << endl;

                          break;}

             case 0x0082:{

                          cout << "LAST_FIT_HIGH" << endl;

                          break;}

             case 0x0040:{

                          cout << "FIRST_FIT_HIGHONLY" << endl;

                          break;}

             case 0x0041:{

                          cout << "BEST_FIT_HIGHONLY" << endl;

                          break;}

             case 0x0042:{

                          cout << "LAST_FIT_HIGHONLY" << endl;

                          break;}

             default:{return;}}}

Результат виконання програми:

Addr=0215:0000  PID=0008  Size=36032   DOS 

Addr=0AE2:0000  PID=0008  Size=64      DOS 

Addr=0AE7:0000  PID=0AFD  Size=16      Data  COMMAND.COM

Addr=0AE9:0000  PID=0AFD  Size=288     Env   COMMAND.COM

Addr=0AFC:0000  PID=0AFD  Size=3536    Pgm   COMMAND.COM

Addr=0BDA:0000  PID=0BDB  Size=5712    Pgm   COMMAND  dir=C:\WINDOWS

Addr=0D40:0000  PID=0BDB  Size=1424    Env   COMMAND.COM

Addr=0D9A:0000  PID=0DAE  Size=288     Env   DN       c:\dn\DN.COM

Addr=0DAD:0000  PID=0DAE  Size=976     Pgm   DN       c:\dFIRST_FIT_LOW

Addr=0DEB:0000  PID=0DFF  Size=288     Data  COMMAND.COM