flat assembler
Message board for the users of flat assembler.

Index > DOS > DOS can be quite dumb

Author
Thread Post new topic Reply to topic
neville



Joined: 13 Jul 2008
Posts: 507
Location: New Zealand
neville
For example, DOS refuses to run any flat binary (COM format) bigger than 64Kb.
IMO there is no good reason for this. It was probably an early feeble attempt to enforce code separation but doesn't really even achieve that purpose. It also ignores the possibility that the code might want to access embedded data, so why shouldn't DS, ES etc be changed?

In FAMOS I have created flat binary applications which are over 30Mbytes in size and which would also run in DOS (with unreal mode) if DOS allowed it.

I have also created several COM files up to 512K in size which WILL run in plain DOS, but only if loaded and executed via DOS's own DEBUG utility!

_________________
FAMOS - the first memory operating system
Post 17 Jan 2009, 22:56
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1901
DOS386
neville wrote:
For example, DOS refuses to run any flat binary (COM format) bigger than 64Kb.


You can have a MZ EXE for just 32 bytes supplement. Wink

> so why shouldn't DS, ES etc be changed?

So go ahead. Any big problem encountered ?

Quote:
In FAMOS I have created flat binary applications which are over 30Mbytes in size and which would also run in DOS (with unreal mode) if DOS allowed it.


Legacy I/O area from $0A'0000 to $0F'FFFF isn't a problem ?

> created several COM files up to 512K in size which WILL run in plain DOS,
> but only if loaded and executed via DOS's own DEBUG utility

Interesting, but MZ would also do the job.

Nevertheless, DOS indeed is a bit "dumb" - it fails to reject broken EXE's Sad

_________________
Bug Nr.: 12345

Title: Hello World program compiles to 100 KB !!!

Status: Closed: NOT a Bug
Post 18 Jan 2009, 08:34
View user's profile Send private message Reply with quote
Goplat



Joined: 15 Sep 2006
Posts: 181
Goplat
neville wrote:
For example, DOS refuses to run any flat binary (COM format) bigger than 64Kb.
If it did load such a program, what should it initialize the stack pointer to? A .COM file must be run with CS = DS = ES = SS at entry... so in a 64k program, no matter what the initial SP is, it'll be overwriting something.
Post 18 Jan 2009, 18:57
View user's profile Send private message Reply with quote
neville



Joined: 13 Jul 2008
Posts: 507
Location: New Zealand
neville
Goplat wrote:
neville wrote:
For example, DOS refuses to run any flat binary (COM format) bigger than 64Kb.
If it did load such a program, what should it initialize the stack pointer to? A .COM file must be run with CS = DS = ES = SS at entry... so in a 64k program, no matter what the initial SP is, it'll be overwriting something.
Yes, another limitation! SP is usually set to something like FFFEh.

_________________
FAMOS - the first memory operating system
Post 18 Jan 2009, 21:00
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.