flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
DOS386 29 May 2007, 06:22
![]() ![]() Code: ; ; FASM example of creation of a linear ( exponential soon I created the probably world's first LE executable using FASM. The example exposes once more the superiority of linkers over FASM: my LE has 338 bytes, the matching "official" DOS/32A example compiling and linking with WATCOM has over 4 KiB, VALX produces over 8 Kib ![]() Tested this "Hello World" and one bigger (cca 2 MiB, might upload it later when complete and mature) file, work like a charm, load as LE as well as compress using "SC" tool ![]() See also my MZ and PE examples: http://board.flatassembler.net/topic.php?t=6735 LE comes from OS/2 .. there it got replaced by LX in 1992 (!!!) and is considered as obsolete ... but on DOS both LE and LX are acceptable. My code is not compliant to anything (there is no "official" LE spec) except DOS/32A's loader and "SC" compressor. Also it requires position-independent-code - from my tests so far this is very easily doable and much better than linking and fixuping ![]() So this is the easy way of coding big (USEDPMI loads into low memory only, up to cca 500 KiB) 32-bit DOS apps ![]()
_________________ Bug Nr.: 12345 Title: Hello World program compiles to 100 KB !!! Status: Closed: NOT a Bug Last edited by DOS386 on 06 Aug 2007, 06:37; edited 5 times in total |
|||||||||||
![]() |
|
vid 30 May 2007, 05:58
is LE windows-only format?
|
|||
![]() |
|
Garthower 30 May 2007, 10:15
Not absolutely. It is used for DOS/32A extender, also for drivers for Windows 9x/ME.
|
|||
![]() |
|
f0dder 30 May 2007, 11:45
Watcom dos-extender (dos4/gw) also used LE, iirc...
|
|||
![]() |
|
rugxulo 31 May 2007, 04:31
From what I've read, LE was indeed developed for OS/2 (and eventually evolved into LX, possibly after MS parted ways with IBM?). NE is what Win16 used, and yes, DOS/4GW (and hence DOS/32a) uses LE also, even under DOS. I think CC386 and OpenWatcom are mostly your best bets for programming freely / openly in such formats, though.
The big problem, IMO, with OS/2 is that it ain't free or open source or popular (unlike DOS or Win32, both of which are somewhat understood in the coding world, hence FreeDOS + HXRT or WINE). DOSBox, at one time, ideally wanted to add OS/2 support. I wish they would, at least since Windows doesn't (any more??) support OS/2 binaries. P.S. What exactly are the advantages to compiling a native OS/2 .EXE instead of just using DOS or Win16? I mean, why should people waste their effort for a separate OS/2 port (and yes, I think they probably should)? What features were just so inherently useful that warranted such?? (Never used OS/2, so I dunno.) |
|||
![]() |
|
DOS386 31 May 2007, 23:02
Quote: LE was indeed developed for OS/2 (and eventually evolved into LX Right ![]() Quote: think CC386 and OpenWatcom are mostly your best bets for programming freely / openly in such formats WATCOM is first dead ![]() ![]() Quote: big problem, IMO, with OS/2 is that it ain't free or open source or popular Right ... Quote: exactly are the advantages to compiling a native OS/2 .EXE instead of just using DOS or Win16? I see no benefit in OS/2 nor in Win3.xxx/Win16 ... while Win32 has __some__ thanks to HX-DOS ![]() |
|||
![]() |
|
rugxulo 04 Jun 2007, 13:54
OpenWatcom isn't dead (unless you mean commercially), but last I heard, it had no maintainer. And CC386 ain't that bloated, but yeah, it's not really an optimizing compiler. At least it's still updated!
![]() Since OS/2 was marketed at one time as "a better DOS than DOS and a better Windows than Windows", I imagine that the OS itself had some advantage. However, compiling to native OS/2 .EXE may not be that useful (dunno, really). P.S. I have seen (as have you, probably) NE .EXEs that are dual DOS and Windows (e.g. old GNUish text utils). Also, I've seen dual .EXEs for DOS + OS/2 (e.g. older HIEW 6.11). However, both are pretty rare. Even DOS + Win32 .EXEs (e.g. G. Vollant's Extract) are quite seldomly found. |
|||
![]() |
|
f0dder 04 Jun 2007, 14:28
Afaik, OS/2 ran win16 apps better than win16... but it sorta lost it's edge once NT arrived. And iirc there were a few design problems wrt. messages and their queues.
Dunno about native OS/2, but it probably has some API advantages? |
|||
![]() |
|
Japheth 04 Jun 2007, 16:54
> but last I heard, it had no maintainer.
It's no longer in the hands of SciTech, but it is still maintained, the newsgroups are active and a new release 1.7 is "about" to be supplied. @NTOSKRNL: does the LE format have any advantages compared to PE? |
|||
![]() |
|
DOS386 05 Jun 2007, 01:07
> It's no longer in the hands of SciTech, but it is still maintained, the newsgroups are active and a new release 1.7 is "about" to be supplied.
We'll see the quality ... especially of the DOS target ... and host availability ![]() > does the LE format have any advantages compared to PE? YES. Can be bound to DOS/32A: 1. Probably (once I got over all the Page Fouls my broken LE's used to produce ![]() 2. Small standalone EXE's (Hello World 27 KiB, PMODE would be smaller but lacks quality) In fact I like neither LE nor PE (yeah ... there is NE also) ... for new development I consider FLAT as the best choice ![]() ![]() ![]() _________________ Bug Nr.: 12345 Title: Hello World program compiles to 100 KB !!! Status: Closed: NOT a Bug |
|||
![]() |
|
Japheth 05 Jun 2007, 03:52
> We'll see the quality ... especially of the DOS target ... and host availability
Being "dead" or just having problems with the code quality due to a lack of manpower/interest is not quite the same. |
|||
![]() |
|
rugxulo 25 Jul 2007, 06:55
Not trying to bump an old thread, but ...
I read that OS/2 supposedly pre-emptively multitasked vs. Win 3.x's cooperative multitasking, so that was supposedly better. Also, eCS ("new" OS/2 variant) can install / work on 64 MB machines as opposed to 512 MB (or whatever) for Win XP. But OS/2 supposedly had (has?) bad compatibility with hardware. I think that's most people's advantage to Windows: hardware drivers and specific commercial apps that run nowhere else. |
|||
![]() |
|
Dex4u 25 Jul 2007, 15:32
NTOSKRNL_VXE wrote: My code is not compliant to anything (there is no "official" LE spec) except DOS/32A's loader and "SC" compressor. Also it requires position-independent-code - from my tests so far this is very easily doable and much better than linking and fixuping position-independent-code is fine if your coding small programs, but not if you need to code programs with 100's of lines of code ![]() |
|||
![]() |
|
f0dder 25 Jul 2007, 21:46
Dex4u wrote:
It depends on how the PIC is done, and what support your language(s) have for it. Using a register as a "load address" or "delta register" (call it what you want) is pretty elegant, load-time fixups require a relocation table and poses a couple of other problems. Of course using a full register sucks on x86 especially in 32-bit mode, because the number of registers are limited. It'd be easy for your tools (including an assembler) to do all variable references through this register, without kludges... of course purists will frown at this, but imho it's not a bad idea (and could easily be toggleable for those who don't want it). But again, it does require tool support to be comfortable, and it does suck a bit on x86... but of course you could always be able to push/pop the base-register if you need it temporarily for a critical innerloop/whatever. _________________ ![]() |
|||
![]() |
|
DOS386 26 Jul 2007, 07:14
> Also, eCS ("new" OS/2 variant) can install / work on 64 MB machines
Maybe ... but I'll stay with DOS & DexOS ![]() Dex4u wrote: > position-independent-code is fine if your coding small programs, but not if you need to code programs with 100's of lines of code I tested with a cca 2 MiB app (OK, most of it was multimedial data ![]() ![]() > load-time fixups require a relocation table and poses a couple of other problems. YES. I dislike fixuping ![]() |
|||
![]() |
|
WindowsNT 11 Jan 2019, 10:47
Many years since, but I 've included this (hopefully you are glad) in my Intel Article
https://www.codeproject.com/Articles/1273844/The-Intel-Assembly-Manual |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.