I'm stuck in a time warp. . .

I'm using 16-bit Dr. DOS and need to be able to move large amounts of memory. What I'm attempting to do is to grab up a huge block of memory (400K), copy a file into that block of memory, then copy that block of memory from the low memory to the upper memory (I'm writing my own version of loadlin but attempting to not use Assembly except in my high-move code).

From reading the data available to me in TC 3.5, using an char far *buf and farmalloc will do the trick for the first part. I'm guessing I need a near pointer to do my fread(), then use movedata() to copy the < 0x10000 chunks to the upper bound memory. Next, I'll move the far chunks by going PM.

I have, however, several questions to which I'm unable to find answers.

1) Will I be able to move between PM and RM without totally hosing up DOS, if I pusha and popa before and after I go into PM? I'm trying to not have to do assembly reads to the raw disk, but just use DOS to feed me data.

2) I've got to move some data (the Linux real mode code) into 0x90000. Does DOS use this as part of its far heap? It isn't a problem if it does, I'll just copy that data at the end, then make sure that I copy my code segment to a location out of the way (to a location that I know), then copy that segment to a lower location (thereby getting me out of the 0x90000 segment), then copy back up.

3) Will the far pointers map to memory in the ASM code correctly? (according to an old post of Bubba, there is a way to do this, but again, I just want to make sure that I'm not chasing my tail.)

Thanks in advance for you help/advice.
Andy