home *** CD-ROM | disk | FTP | other *** search
-
- unit System;
-
- { This is a dummy system unit, which does almost nothing. }
-
- interface
-
- var { TP needs a public var & const block }
- static_var : byte;
- const
- const_var : byte = 0;
-
- implementation
-
- { These routines must be declared in the right order (the compiler calls
- them by number, not by name) and must be far. In the TP 6.0 SYSTEM.TPU there
- are 137 of them; buy the RTL source if you want to know what they do. Coding
- the other 134 stubs would be a good idea, but I couldn't be bothered. }
-
- procedure InitTurbo; far; assembler;
- asm
- mov dx, seg(const_var)
- mov ds,dx { Load DS }
- mov al,const_var { We have to be sure the var's & const's get linked
- in }
- mov static_var,al
- end;
-
- procedure HaltError; far; assembler;
- asm
- mov ax,$4c01
- int $21 { Halt with exit code 1 }
- end;
-
- procedure HaltTurbo; far; assembler;
- asm
- mov ax,$4c00
- int $21 { Halt with exit code 0 }
- end;
-
- end.