flat assembler
Message board for the users of flat assembler.
Index
> Windows > Before Windows 95 in FASM |
Author |
|
nkeck72 27 Sep 2015, 23:19
Everyone has heard of Win32 and Win64 programming in FASM. But what about writing those old (and nostalgic) Win 3.11 (idk if this is in PE format or MZ) and Win 1.0/2.0 programs in MZ format? Does FASM have a preset format statement built in for these kinds of programs or do you have to write the 'format MZ' pseudo-instruction and do the GUI setup code yourself?
P.S. I have never written anything below PE format so I was just wondering if it was possible to use FASM to write for these older Windows versions? _________________ It may look hard, but it won't take long if you take it one byte at a time. NOS: www.github.com/nkeck720/nos |
|||
27 Sep 2015, 23:19 |
|
revolution 28 Sep 2015, 03:21
'format mz' will generate a 16-bit MZ exe format file. That should be fine for 16-bit versions of Windows and DOS.
|
|||
28 Sep 2015, 03:21 |
|
Tomasz Grysztar 28 Sep 2015, 05:44
For 16-bit Windows you need to create the NE executable, and fasm never did support that output format. However you could try to build it from scratch with data directives, just like some people did it with PE.
On Windows 3.11 it was also possible to run 32-bit programs after installing the Win32s extension. The PEDEMO example from fasm package did run correctly under Win32s and you may notice that it still mentions it in the comment next to relocation section definition, because Win32s would not run a PE executable without the relocation information. |
|||
28 Sep 2015, 05:44 |
|
ACP 28 Sep 2015, 09:29
Here is another interesting link - how to create LE in FASM: http://board.flatassembler.net/topic.php?t=7122
I think the biggest problem would be creating VxD using FASM for old Windows. If you don't need VxD than everything you will need to build Win16/Win32 app for pre Win95 systems can be found here in forum. You may also want to research a subject of dos extenders. This may help you to address some file format and memory issues (however dos extenders bring their own set of issues as well when programming). In older systems - depending on the software configuration you are talking about - you may look for extenders supporting VCPI and DPMI. There are also two good books regarding assembly language programming (none of them uses FASM synatx) for systems predates Win95: Windows Assembly Language and Systems Programming: 16- and 32-Bit Low-Level Programming for the PC and Windows Extending DOS |
|||
28 Sep 2015, 09:29 |
|
nkeck72 29 Sep 2015, 10:49
The wiki page there doesn't seem to explain the format... is there anywhere I can see the format structure?
|
|||
29 Sep 2015, 10:49 |
|
Tomasz Grysztar 29 Sep 2015, 11:39
I recall that Ralf Brown's Interrupt List contained some information about this format. Search for the "Format of new executable header" phrase in the description of function 4Bh of interrupt 21h.
|
|||
29 Sep 2015, 11:39 |
|
ACP 29 Sep 2015, 11:47
If you are refering to NE file format here are useufl links (Tomasz is right that Ralf Brown Interrupt List describes it)
http://www.ctyme.com/intr/rb-2939.htm#Table1596 http://wiki.osdev.org/NE |
|||
29 Sep 2015, 11:47 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.