flat assembler
Message board for the users of flat assembler.

flat assembler > DOS > problem with unREAL mode fasm

Goto page 1, 2, 3, 4, 5  Next
Author
Thread Post new topic Reply to topic
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7299
Location: Kraków, Poland
I've got a bad news for the fasm's unREAL mode fans. Wink
As you may know, even though unREAL allows the 4 GB of data to be used in one segment, it still limits the code that can be run from one segment to 64 KB.
And this is starting to become a problem, because fasm's code (with all the data - tables, etc. - already moved above) is almost 64 KB already, and is going to "break this barrier" soon.
So I have two choices - either I will try to keep the unREAL version running somehow (it could be possible to move some parts of code to other segments, but still I would have to replace some parts of common core code particularly for this version - and I dislike it), or get rid of unREAL code and leave only the DPMI variant (this already happened with FASMD).
What do you think? I mean, if there's anyone who still uses DOS version and who cares... Wink
Post 09 Jan 2008, 12:20
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4201
Location: 2018
fasmd doesn't work on pure dos.
cause of dpmi
so, a simple fasmd.exe supported on pure dos is a good thing.
unreal, dmpi, big real, all these modes are problems instead to be solutions.
running fasmd on pure real mode, yes we want.
Post 09 Jan 2008, 12:50
View user's profile Send private message Visit poster's website Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
Couldn't it worked aroung by adding a couple of int3 on the first offsets and install a int3 handler that workarounds the problem or it is just simply imposible to have EIP[31:16] <> 0 on real/unreal mode?
Post 09 Jan 2008, 14:20
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7108
Location: Slovakia
edfed: do you actually USE fasmd in pure dos, or do you just want it? Smile
Post 09 Jan 2008, 14:56
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Vov4ik



Joined: 20 May 2007
Posts: 28
Location: USSR, Moscow Region
Why you can't use more, than one code segments? Just FAR JMP or FAR CALL to code in the other sehgment(s).
Post 09 Jan 2008, 15:03
View user's profile Send private message ICQ Number Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7299
Location: Kraków, Poland
LocoDelAssembly wrote:
Couldn't it worked aroung by adding a couple of int3 on the first offsets and install a int3 handler that workarounds the problem or it is just simply imposible to have EIP[31:16] <> 0 on real/unreal mode?

The problem is with interrupts, which store only IP (not EIP) on stack. If I disabled interrupts for the time of assembly, there would be no problem like that. I considered this kind of solution, too - but I need to call DOS functions sometimes and this is a problem. The only module that doesn't use DOS calls at all is the parser - I may then move parser to the end of code segment and disable interrupts for the time of parsing. A bit ugly, but may work for some time...

Vov4ik wrote:
Why you can't use more, than one code segments? Just FAR JMP or FAR CALL to code in the other sehgment(s).

As I said, this would require changes in the files that are currently common between the architectures - and I don't want such sulution. It would be possible to make some macros to keep the core files common, but I still don't like it.
Post 09 Jan 2008, 15:08
View user's profile Send private message Visit poster's website Reply with quote
Japheth



Joined: 26 Oct 2004
Posts: 151
Hi,

my suggestion: throw away the unreal thing and restrict to DPMI.

You can easily integrate hdpmi in the FASM binary, see:

http://board.flatassembler.net/topic.php?t=7593

so FASM will remain a stand-alone binary running in DOS (and as a goody, it will also run in v86-mode).
Post 09 Jan 2008, 16:32
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7299
Location: Kraków, Poland
Japheth wrote:
Hi,

my suggestion: throw away the unreal thing and restrict to DPMI.

You can easily integrate hdpmi in the FASM binary, see:

http://board.flatassembler.net/topic.php?t=7593

so FASM will remain a stand-alone binary running in DOS (and as a goody, it will also run in v86-mode).

I wouldn't like to integrate any 3rd party code.
fasm was initially (in pre-public versions) integrated with my own extender (HDOS), but later I dumped it.
I prefer to leave fasm using whatever DPMI is available, so you can choose the one that works best for you (and in Windows subsystem you got the best one available there).
Post 09 Jan 2008, 16:41
View user's profile Send private message Visit poster's website Reply with quote
Japheth



Joined: 26 Oct 2004
Posts: 151
Tomasz Grysztar wrote:

I prefer to leave fasm using whatever DPMI is available, so you can choose the one that works best for you (and in Windows subsystem you got the best one available there).


Ok. However, this is no real argument, since the startup code can always decide whether to use the currently running DPMI host or - if it is possible at all - to run under the one supplied with the binary.
Post 09 Jan 2008, 16:47
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4201
Location: 2018
i was stupefied by the existance of fasmd...
and really disapointed when i tryed it on dos, doesn't work, all my hopes to use fasmd on a dos compatible hand made system is in the garbages...
so yes, i use fasmd on dos.
but dos with windows...
all i want, is to use fasmd on a pure dos floppy disk... guess why!
only cause dos starts instantlly, a fatal bug is corrected faster when using a dos platform, restart is less than 5 seconds...and then, fasmd become the OS, cause it's directlly launched...
Post 09 Jan 2008, 19:31
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7299
Location: Kraków, Poland
edfed: you need a DPMI service to be installed on your DOS. Try either HDPMI from the FreeDOS distributions, or the CWSDPMI.
Post 09 Jan 2008, 21:21
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1904
.

Tomasz wrote:

Quote:
it still limits the code that can be run from one segment to 64 KB.
And this is starting to become a problem, because fasm's code (with all the data - tables, etc. - already moved above) is almost 64 KB already


But the EXE is 73 KiB already and you have a "32-bit" unreal mode ?

Anyway, my suggestions:

- Throw away the unreal mode and integrate HDPMI32
or
- Integrate HDOS, but make sure that it also works if an external DPMI host (HDPMI32) is present.

Existing FASM without IDE for DOS does NOT work if a DPMI host exists and in real mode Sad Several people including me complained about this but there was no clear answer so far Neutral Also it reportedly doesn't work on Cyrix Neutral

edfed wrote:

> fasmd doesn't work on pure dos.
> cause of dpmi

NOT true Idea

> running fasmd on pure real mode, yes we want.

NONSENCE - in future please try to reduce the quantity of your posts and increase the quality of them instead Idea

LocoDelAssembly wrote:

Quote:
Couldn't it worked aroung by adding a couple of int3 on the first offsets and install a int3 handler that workarounds the problem or it is just simply imposible to have EIP[31:16] <> 0 on real/unreal mode?


Horrible hack, DPMI is better Idea

vid wrote:

> edfed: do you actually USE fasmd in pure dos, or do you just want it?

I DO USE it in DOS Idea

edfed wrote:

Quote:
i was stupefied by the existance of fasmd... and really disapointed when i tryed it on dos, doesn't work, all my hopes to use fasmd on a dos compatible hand made system is in the garbages...


Why didn't you ask here ? Idea instead of posting all your stupid Drunk Stuff ? Idea

Quote:
so yes, i use fasmd on dos. but dos with windows...


Seems you have no idea what DOS is Crying or Very sad


Last edited by DOS386 on 09 Jan 2008, 21:43; edited 3 times in total
Post 09 Jan 2008, 21:21
View user's profile Send private message Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7299
Location: Kraków, Poland
DOS386 wrote:
Tomasz wrote:

Quote:
it still limits the code that can be run from one segment to 64 KB.
And this is starting to become a problem, because fasm's code (with all the data - tables, etc. - already moved above) is almost 64 KB already


But the EXE is 73 KiB already and you have a "32-bit" unreal mode ?

I said it in the text you quoted - all my data and tables are moved to places after the code. The code itself is still smaller than 64 KB.

DOS386 wrote:
Anyway, my suggestions:

- Throw away the unreal mode and integrate HDPMI32
or
- Integrate HDOS, but make sure that it also works if an external DPMI host (HDPMI32) is present.

I'm OK with throwing away the unreal, but I won't provide DPMI host with fasm. I just feel it's not the way it should be.
I would make it work just like FASMD does now.
Post 09 Jan 2008, 21:25
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1904
.

Quote:
I said it in the text you quoted - all my data and tables are moved to places after the code. The code itself is still smaller than 64 KB.


OK, I didn't analyze it in deep - default operand size in CS is 32-bit, but CS limit still 16-bit ?

Quote:
OK with throwing away the unreal, but I won't provide DPMI host with fasm. I just feel it's not the way it should be. I would make it work just like FASMD does now.


It's OK for me ... having a DPMI compatible HDOS included would be better of course - smaller than HDPMI32's 33 KiB maybe ? Idea

Any plans with HDOS ? In other tread you pointed me to it, but no "final" answer at the end.

_________________
Bug Nr.: 12345

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

Status: Closed: NOT a Bug
Post 09 Jan 2008, 21:35
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4201
Location: 2018
give me some support for dmpi on msdos 6.22 and i'll shut up.
Quote:

Seems you have no idea what DOS is

yes and i don't want to know more about this middle age OS.
Post 09 Jan 2008, 21:38
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7299
Location: Kraków, Poland
edfed wrote:
give me some support for dmpi on msdos 6.22 and i'll shut up.

http://clio.rice.edu/cwsdpmi/csdpmi5b.zip

Load it with the "cwsdpmi -p" command.
Post 09 Jan 2008, 21:44
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1904
> give me some support for dmpi on msdos 6.22 and i'll shut up.

Download HXRT.ZIP, extract HDPMI32.EXE and shut up Idea

HDPMI32 -r

> yes and i don't want to know more about this middle age OS.

Your problem is that you don't know what you want at all Laughing
Post 09 Jan 2008, 21:44
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1904
Tomasz wrote:

Quote:
I prefer to leave fasm using whatever DPMI is available, so you can choose the one that works best for you


I see NO problem here. Just don't use the included one if an external is available (bypassing existing is bad, DOS/32A 9.xx does this way).

Quote:
and in Windows subsystem you got the best one available there.


Not for me Confused
Post 09 Jan 2008, 21:53
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4201
Location: 2018
thank you
Post 09 Jan 2008, 21:59
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4201
Location: 2018
now, it works very well, i have fasmd 10 seconds after boot from a floppy.

thank you all, exept dos386 for his sarcasms... Wink
Post 09 Jan 2008, 23:25
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:  
Goto page 1, 2, 3, 4, 5  Next

< 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-2019, Tomasz Grysztar.

Powered by rwasa.