Contents | Prev | Next

7.4.33 The msdos procedure

Description

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

Parameter

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.

Example

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

Portability

Operating Systems: DOS Only
Standard Pascal: No

Contents | Prev | Next