Documentation for RTM.EXE (16-Bit) from Borland (Developers)
> > One more question (sorry): I didn't try it but, if I used your HX DOS
> > Extender with the Delphi V1 command line compiler DCC.EXE (16-Bit) it might
> > not work since it uses for example RTM.46 - I don't even have a name for
> > that function.
>
> I also have no idea what this is supposed to do.
Just for completeness, I found the definition of the function RTM.46 in the newsgroup:
Dmitry Dmitrienko wrote on May 05, 1997 in comp.lang.pascal.borland
> There are no problems if you use protected mode and write using DPMI
> target of BP. E.g. you can use RTM entry point i've 'discovered'
> tree years ago:
function MemAllocateBigBlock(HeapHandle: Word; Size: LongInt;
Flags: Word; EventProc: Pointer; var Selector: Word): Integer; far;
external 'RTM' index $002E;
function MemFreeBlock(Selector: Word): Integer; far;
external 'RTM' index $0006;
> Usually, i'm using this functions in following manner:
var
Selector1M: Word;
Size: Longint;
begin
Size:=1024 * 1024;
if MemAllocateBigblock(0, Size, 4, nil, Selector1M) = 0
then begin
{allocated ok}
SetSelectorLimit(Selector1M,Size-1);
end
else begin
{function failed}
end;
{ use this memory block }
{ free memory block}
MemFreeBlock(Selector1M);
end;
> where procedure SetSelectorLimit looks like:
procedure SetSelectorLimit(Sel: Word; Limit: Longint);
begin
if Limit > 1024 * 1024 then { page-align needed }
begin
Limit:=(Limit + $FFF) and NOT $FFF;
end;
asm
mov ax,8 { set selector limit}
mov bx,Sel
mov cx,word ptr Limit[2]
mov dx,word ptr Limit[0]
int 31h
end;
end;
I believe Dmitry Dmitrienko can be reached through http://www.php-debugger.com/resume/, but I am not quite sure.
I am reposting this here because it seems to me that the information in the newsgroups are disappearing over time.
Comparing RTM.46 (MemAllocateBigBlock) with RTM.5 (MemAllocateBlock) it looks reasonable:
function MemAllocateBigBlock(HeapHandle: Word; Size: LongInt; Flags: Word;
EventProc: Pointer; var Selector: Word): Integer; far;
external 'RTM' index $002E;
function MemAllocateBlock(HeapHandle, Size, Attributes: Word;
EventProc: Pointer; var Selector: Word): Integer; far;
external 'RTM' index $0005;
Hope someone will find that usefull.
BTW: Searching or browsing the newsgroups with google is getting worse every day - why?
---
I am still so much in love with Borland Pascal Version 7.0
Complete thread:
- Documentation for RTM.EXE (16-Bit) from Borland - fm77, 11.05.2011, 11:48 (Developers)
![Open in board view [Board]](img/board_d.gif)
![Open in mix view [Mix]](img/mix_d.gif)
- Documentation for RTM.EXE (16-Bit) from Borland - Japheth, 11.05.2011, 19:31
- Documentation for RTM.EXE (16-Bit) from Borland - fm77, 11.05.2011, 23:20
- Documentation for RTM.EXE (16-Bit) from Borland - Japheth, 12.05.2011, 09:58
- Documentation for RTM.EXE (16-Bit) from Borland - fm77, 12.05.2011, 10:55
- Documentation for RTM.EXE (16-Bit) from Borland - fm77, 04.05.2012, 11:42
- Scalar: How to patch Borland Pascal 7.0 to use 32-Bit DPMI - Arjay, 05.05.2012, 11:13
- Scalar: How to patch Borland Pascal 7.0 to use 32-Bit DPMI - Laaca, 05.05.2012, 17:46
- Scalar: How to patch Borland Pascal 7.0 to use 32-Bit DPMI - Arjay, 05.05.2012, 18:11
- Scalar: How to patch Borland Pascal 7.0 to use 32-Bit DPMI - Laaca, 05.05.2012, 17:46
- Scalar: How to patch Borland Pascal 7.0 to use 32-Bit DPMI - Arjay, 05.05.2012, 11:13
- Documentation for RTM.EXE (16-Bit) from Borland - Japheth, 12.05.2011, 09:58
- Documentation for RTM.EXE (16-Bit) from Borland - fm77, 11.05.2011, 23:20
- Documentation for RTM.EXE (16-Bit) from Borland - Arjay, 06.05.2012, 12:41
- Documentation for RTM.EXE (16-Bit) from Borland - fm77, 08.05.2012, 16:50
- Documentation for RTM.EXE (16-Bit) from Borland - Japheth, 11.05.2011, 19:31
Mix view