The msdos procedure


The msdos procedure makes a call to MSDOS through x86 processor interrupt $21.


The msdos procedure's only parameter is a reference to the variable of registers type which contains values to pass into the x86 processor registers before the interrupt is generated, and which receives the contents of the x86 processor registers after the interrupt is serviced.


   //For example the following simple program uses
   // MSDOS function $30 to get the MSDOS version number.
   program GetVer(output);
      regs : registers;
      fill(regs, 0);
      regs.ah := $30; := $00;
      write('MSDOS version is ');
      if = 0 then
         writeln(, '.', regs.ah:1)


Operating Systems: DOS Only
Standard Pascal: No