Subject: Re: Protected Mode Date: Fri, 24 Jul 1998 15:35:48 -0400 From: "Bean" Newsgroups: comp.lang.pascal.borland >I do not know much about protected mode and I never used it before. What must I >do to use it and what is the main-difference? I heard you can access all memory >of the computer with it very simply... > If you have BP7.0 then you only have to change target from real to protected. Protected mode has the following properties: Creates DPMI applications Can use all memory (64Meg max I think) for the Heap only Still has 64K segments, so you can't just create huge arrays Does not support overlays (all units load at startup). Code segments are write protected (this means no self-modifying code) Data segments are range restricted. If you go outside of an array range with range checking off you get a page-fault error. There are very few other things you have to change. However if you must use the heap to take advantage of the extra memory. The data segment is still only 64K max. I believe that programs actually run slightly slower in protected mode because of the way segments are handled, and because the processor must change from protected mode to real mode to do all bios code. (Someone please correct me if I as wrong about this). Most of my programs that I compiled in protected mode needed very little modifications if any. Hope this helps, Bean, thitt@igateway.com ------------------------------------------------------------------------------ Subject: Q: Swap-file via RTM.EXE (DPMI) Date: Tue, 04 Aug 1998 08:37:33 +0100 From: Bernd Heutling Organization: RRZN - Newsserver Newsgroups: comp.lang.pascal.borland Hi all, again I got stuck and I'd be grateful if you could help me. In protected mode you've got lots of memory but sometimes it is still not enough. After some time I found a source (sorry, it's German: "Zauber- künstler DPMI" by Sen Letzel, DOS Toolbox 4/93, pp34-37) which showed me how to initialize a swapfile on the harddisk of up to 2 GByte. That uses undocumented functions in RTM.EXE ... I know, I know .... :-( Anyway, after initializing the Init-function returns rtmOk = successfully finished rtmNoMemory = not enough space on the disk rtmFileIOError = unspecified I/O-error I've used this successfully for a long time (see date of literature) but now I'm more and more encountering problems. And this is the problem: since there is no interface of the RTM.EXE (understandably) I do not know what values are equal to the constants and so I do not know what error I bumped into. Does anybody know which constant has which value? (By the way, the data format of the function-return is integer.) Thank you very much in advance. Bernd Heutling -------------------------------------------------------------------------------- Subject: Re: Q: Swap-file via RTM.EXE (DPMI) Date: Tue, 4 Aug 1998 09:39:29 +0100 From: Pedt Scragg Organization: Working in Chaos Newsgroups: comp.lang.pascal.borland In article <35C6BA3D.4B16@mbox.ikph.uni-hannover.de>, Bernd Heutling writes >Anyway, after initializing the Init-function returns > rtmOk = successfully finished > rtmNoMemory = not enough space on the disk > rtmFileIOError = unspecified I/O-error >Does anybody know which constant has which value? (By the way, the data >format of the function-return is integer.) > For Open: rtmOK = 0 rtmNoMemory = 1 rtmFileIOError = $22 -- Pedt Scragg Never curse the Crocodile's mother before crossing the river