Difference between revisions of "DOS"
(→Status) |
|||
Line 16: | Line 16: | ||
Please update/extend this page as more details become available. | Please update/extend this page as more details become available. | ||
+ | |||
+ | === Supported memory models === | ||
+ | |||
+ | ==== Tiny ==== | ||
+ | |||
+ | * Activated by the -WmTiny compiler option | ||
+ | * Code + Data + Heap + Stack <= 64KB | ||
+ | * CS = DS = SS | ||
+ | * Code starts at offset $100 | ||
+ | * Can produce both .com and .exe files. The binary format can be chosen with the -Wtcom and -Wtexe compiler options. The default format is .exe | ||
+ | |||
+ | ==== Small ==== | ||
+ | |||
+ | * Activated by the -WmSmall compiler option. This is the default memory model, so it is chosen if you don't specify a memory model. | ||
+ | * Code <= 64KB | ||
+ | * Data + Heap + Stack <= 64KB | ||
+ | * Code and data are in separate segments, so programs can use up to 128KB in total | ||
+ | * DS = SS | ||
+ | * Can produce only .exe files | ||
+ | |||
+ | ==== Medium ==== | ||
+ | |||
+ | * Activated by the -WmMedium compiler option | ||
+ | * Code <= 1MB | ||
+ | * Data + Heap + Stack <= 64KB | ||
+ | * DS = SS | ||
+ | * Can produce only .exe files | ||
== Requirements == | == Requirements == |
Revision as of 13:26, 27 September 2013
Overview
A DOS (8086) cross compiler is currently being developed in FPC trunk (the development version). It started as a hobby project meant to explore how to port FPC to a new platform.
The amount of (FPC on) DOS users is probably quite low, especially since there is an FPC compiler for the more capable GO32v2 DOS extender available which runs on 80386+ processors.
Snapshots
There's a snapshot available here:
http://www.bttr-software.de/forum/forum_entry.php?id=12985
It is not the latest version, but contains all the necessary tools and instructions to build the cross compiler under Windows.
Status
The compiler has not yet been enabled as a CPU/OS target in FPC.exe.
Please update/extend this page as more details become available.
Supported memory models
Tiny
- Activated by the -WmTiny compiler option
- Code + Data + Heap + Stack <= 64KB
- CS = DS = SS
- Code starts at offset $100
- Can produce both .com and .exe files. The binary format can be chosen with the -Wtcom and -Wtexe compiler options. The default format is .exe
Small
- Activated by the -WmSmall compiler option. This is the default memory model, so it is chosen if you don't specify a memory model.
- Code <= 64KB
- Data + Heap + Stack <= 64KB
- Code and data are in separate segments, so programs can use up to 128KB in total
- DS = SS
- Can produce only .exe files
Medium
- Activated by the -WmMedium compiler option
- Code <= 1MB
- Data + Heap + Stack <= 64KB
- DS = SS
- Can produce only .exe files
Requirements
The compiler is a cross compiler that runs at least on Windows (both x86 and x64) and Linux. For compiling, it needs:
- the Netwide Assembler - NASM
- the Open Watcom linker - WLINK
- the Open Watcom library manager - WLIB
In theory it should be able to run on any platform, supported by FPC, where NASM and the Open Watcom tools are available. This includes DOS via the GO32V2 extender. However, because the Watcom tools for DOS are compiled with a different extender, there are some issues related to long file names and the passing of long command line arguments. This might be resolved by recompiling the Watcom tools with DJGPP or by implementing a 16-bit DOS backend asm object writer and linker inside FPC.
Limitations
The DOS platforms brings some limitations, like
- no simple way of pre-emptive multitasking.
- it is unlikely the Lazarus LCL GUI will be ported to the DOS environment
- However, an OpenGEM widget set is possible
- When the large memory model of the i8086 code generator matures, Win16 support can also be implemented