Home |
RTTarget-32 Programming Manual Running Win32 Programs without Win32 Running a Program on the Target Booting from the CPU Reset Vector Booting from MS-DOS Compiling and Linking with On Time RTOS-32 |
Booting from MS-DOSProgram Rttboot allows booting an RTTarget-32 program from MS-DOS. Rttboot.com is a small MS-DOS loader program which loads an RTB file given on its command line and transfers control to it. The file is read via DOS and all program entities are copied to their target addresses. Subsequently, a far jump to the application's boot code or boot vector is performed. Rttboot cannot load and boot every RTTarget-32 program. In particular, the following restrictions apply:
To satisfy the first requirement, no memory manager such as EMM386, QEMM, etc. may be loaded (EMM memory managers run the computer in virtual 8086 mode). The second requirement will usually also not allow using an XMS memory manager such as HIMEM.SYS, since HIMEM will allocate all available extended memory. The only exception are RTTarget-32 programs which do not load any images into extended memory. Apart from a suitably configured DOS system, an application to be loaded via Rttboot must also be configured correctly:
Since Rttboot transfers control to the application, a boot vector is not required. If one is used, RTLoc will issue a warning that the vector is not located at a suitable address. If no boot vector is used, RTLoc will warn about a missing boot vector. Both warnings can safely be ignored. Locating a DiskBuffer can surpress the warning (and keep the program compatible with booting from disk). DOS will typically occupy the first 64k of real-mode address space. Rttboot is a COM file and thus will occupy exactly another 64k. Therefore, on a minimal DOS system, it is sufficient to reserve the first 128k for DOS (note: these 128k can still be used for RAM remapping, or for entities not requiring an image). However, to be on the safe side, it is recommended to reserve at least 256k for DOS. Example:Region NullPage 0 4k RAM Region DOSMem 4k 252k RAM Region LowMem 256k 256k RAM Region HighMem 1M 1M RAM Region MonoText B0000h 4k Device ReadWrite Region ColorText B8000h 4k Device ReadWrite VideoRAM ColorText FillRAM HighMem Locate BootCode Biosboot.exe LowMem Locate BootData BootData LowMem 0 16 Locate DiskBuffer DiskBuffer LowMem Locate PageTable PageTable HighMem Locate Header Header HighMem Locate NTSection CODE HighMem Locate NTSection DATA HighMem Locate Stack Stack HighMem 16k Locate Heap Heap HighMem This example uses the scarce conventional memory only for entities which must reside in real mode address space: boot code, boot data, and the (for DOS booting optional) disk buffer. RTTarget-32 takes complete control of the hardware and thus cannot return to DOS. When the RTTarget-32 application terminates, the PC is rebooted. Running a Program on the Target
|