Previous: 4.74.2.23. Intr procedure To the Table of Contents Next: 4.74.2.25. PackTime procedure
4.74.2.23. Intr procedure Table of Contents 4.74.2.25. PackTime procedure

- 4.74.2.24. -
Table of Contents
4. Standard Units
4.74. WinDos - MS-DOS function emulation for OS/2 and Win32
4.74.2. WinDos Unit Procedures and Functions
4.74.2.24. MsDos procedure


4.74.2.24. MsDos procedure

Targets: MS-DOS only

Dos Unit, WinDos Unit

Executes a DOS function call.

Declaration:
procedure MsDos(var Regs: TRegisters);
Remarks:
Load Regs with the proper parameters before calling MS-DOS. Regs returns the values of the registers after the interrupt. Notice that TRegisters type allows access to 32 bit registers. Calls to DOS that depend on ESP and SS cannot be executed. To an interrupt other than $21, use Intr. For more information about DOS interrupt calls consult your DOS reference manual.

Note that all segment registers (DS, ES, FS, GS) must contain valid segment descriptors or be set to zero prior to using MS-DOS.

Example:
uses
  WinDos;
procedure DispString(DispStr: String);
var
  Regs    : Registers;
begin
  DispStr := DispStr + #0;
  Regs.AX := $0900;
  Regs.EDX:= DWord(@DispStr) + 1;
  Regs.DS := DSeg;  
  Regs.ES := 0;
  Regs.FS := 0;
  Regs.GS := 0;
  MsDos(Regs);
end.



Previous: 4.74.2.23. Intr procedure To the Table of Contents Next: 4.74.2.25. PackTime procedure
4.74.2.23. Intr procedure Table of Contents 4.74.2.25. PackTime procedure

- 4.74.2.24. -