<br><br>
<div><span class="gmail_quote">On 1/11/07, <b class="gmail_sendername">Tomas Hajny</b> <<a href="mailto:XHajT03@mbox.vol.cz">XHajT03@mbox.vol.cz</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Daniel Franzini wrote:<br><br><br>Hi Daniel,</blockquote>
<div> </div>
<div>Hi</div><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br>I've had difficulties running FPC apps (probably including the compiler<br>itself) under FreeDOS in the past (whereas it works properly with other
<br>DOS implementations like MS-DOS, IBM PC DOS and DR-DOS/Novell DOS). Things<br>might have improved since then, though.</blockquote>
<div> </div>
<div>the compiler does run fine here...i think things got better now, since fpc is now part of the oficial freedos 1.0 packages...things that annoy me in freedos are a bug in setedit which makes the mouse gets crazy and the fact that i could not yet set up my keyboard correctly...the rest does run fine here...
</div>
<div> </div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br>GO32v2 is a protected mode application, indeed - specifically, it's using<br>DPMI (DOS Protected Mode Interface). No special extender is needed if you
<br>already have DPMI host available (up and running). Some DOS<br>implementations already include this such DPMI host, similarly DPMI host<br>is provided for DOS applications running under Win 3.x, Win32 platforms,<br>OS/2, etc. If you run GO32v2 applications and no DPMI host is running, the
<br>loader/stub (linked into the compiled executable) tries to locate (using<br>standard search rules - current directory and then using %PATH%) and<br>launch CWSDPMI.EXE first (thus starting a DPMI host itself).</blockquote>
<div> </div>
<div>this is something still obscure to me....when i target the compiler to go32v2, the compiler generates my code and links it with some magic code in order to work correctly with the funtions provided by the host (which in the general case is a standalone exe)???
</div><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br>I guess the description above should be sufficient. Alternatively, you can<br>bind the DPMI host directly into the executable (using tools provided
<br>within the standard CWSDPMI package), but this is of limited use in<br>general (only reasonable if having single GO32v2 executable on a DOS<br>machine with no DPMI host).</blockquote>
<div> </div>
<div>i guess i should look for the DPMI host documentation on freedos in order to find out what host it is, if its enabled by default and how to enable/disable it...but thanks anyway</div><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br>Surely, this inline stuff needs to be disassembled and ported to a 32-bit<br>protected mode environment in order to make it to work properly with FPC.
</blockquote>
<div> </div>
<div>the code that generates is here:</div>
<div>
<div>
<div>------------------code start-----------------------------</div>
<p> {diskwrite}<br> asm<br> push bp<br> mov bp, sp<br> add bp, 8<br> push ds<br> mov bx, [bp]<br> mov ax, [bp+2]
<br> mov ds, ax<br> mov cx, [bp+4]<br> mov dx, [bp+6]<br> mov al, [bp+8]<br> push bp<br> int 26h<br> jnc ok
<br> popf<br> pop bp<br> mov [bp+10], ax<br> jmp cont<br> ok: popf<br> pop bp<br> xor ax, ax<br> mov [bp+10], ax
<br> cont: pop ds<br> pop bp<br> mov ax, 13h<br> int 21h<br> ret</p>
<div>------------------code end-----------------------------</div></div></div><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br>Rewrite it in proper 32-bit assembler targetted for a protected mode<br>environment. I guess you should be able to find some information available
<br>on Internet regarding what needs to be changed and how, but it isn't that<br>simple to be described here (especially with functions requiring a memory<br>buffer shared between real mode and protected mode code like with your
<br>disk read/write functions).</blockquote>
<div> </div>
<div>like i said to Daniel Mantionne, the plans are to rewrite it in pure pascal...but it should work first in 32bit assembly...what would be the main differences between the two asm sources??</div><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br>I guess that it's easier to discuss the particular example you tried<br>directly if you post it here.
<br><br>Tomas<br><br></blockquote></div><br>thanks<br clear="all"><br>-- <br>Daniel<br><br>"Let us change our traditional attitude to the construction of programs. Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to human beings what we want a computer to do." (Donald Knuth)
<br><br>"Yes, technogeeks can be funny, even if only to each other." (<a href="http://www.boogieonline.com/revolution/science/humor/">http://www.boogieonline.com/revolution/science/humor/</a>)"<br><br>"Man is driven to create; I know I really love to create things. And while I'm not good at painting, drawing, or music, I can write software." (Yukihiro Matsumoto,
a.k.a. ``Matz'')