Previous: 4.24.2.24. Keep To the Table of Contents Next: 4.24.2.26. PackTime
4.24.2.24. Keep Table of Contents 4.24.2.26. PackTime

- 4.24.2.25. -
Table of Contents
4. Standard Units
4.24. DOS - MSDOS support unit
4.24.2. DOS Unit Procedures and Functions
4.24.2.25. MsDos


4.24.2.25. MsDos

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
  Dos;
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.24.2.24. Keep To the Table of Contents Next: 4.24.2.26. PackTime
4.24.2.24. Keep Table of Contents 4.24.2.26. PackTime

- 4.24.2.25. -