Free Pascal is actually a very good choice for DOS. You can use it write both 32-bit protected mode DOS programs or 16-bit real mode programs.