Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

32-bit MSDOS (Announce)

posted by kerravon E-mail, Ligao, Free World North, 02.07.2021, 00:59

> > What is required to get Pascal to work? Starting
> > with println('hello, world')
> > or whatever it is in Pascal.
>
> Well, the easiest would be to use the 16-bit compiler and run it under your
> 16-bit OS.

I'm not very interested in PDOS/86. I would
like a 32-bit OS running 32-bit applications.

> (Or use some antique compiler version that generates binaries

Ok, so it used to support the older Win95, but
a decision was made to abandon this older
environment.

I think this is the fundamental point at which
I diverge - I am interested in environments
that are even less capable than Win95. I'm
looking for the minimal environment required
to write a "hello world" Pascal program.

A Pascal program takes in a bunch of text files,
and outputs a single binary file. This basic
functionality should exist on literally every
Pascal platform that has ever existed, and I
expect Free Pascal to have this as a target.

> that run under your win32 emulation, but more on windows later)

Is there a reason you call it an "emulation"?
Win32 is actually the only supported advertised
API. I would have thought "mini-clone" or
"subset" would be a better description.

> You need to port the runtime, but that is pretty trivial. You can also do
> away with the 1MB copying and adjust to your calls.
>
> The problems are in
> - the linker. There is an internal one for go32v2 target. djgpp ld is also
> possible. On go32v2, the compiler directly generates coff .o and .a's.
> - exception support. I guess for go32v2 it is SJLJ, so no problem.
> - stack checking
> - startup code is OS specific and must be created/ported.
> - uses two handful of djgpp/extender symbols for things like ctrl-c
> trapping.
>
> All will require some time. If there are problems with the linkers, those
> are probably the most complicated.

Ok, let me leave this aside for the moment. I
don't have a lot more 32-bit MSDOS functionality
compared to Win32 functionality available anyway,
so resorting to 32-bit DOS extenders is not likely
to buy anything. ie I might be able to support
go32v2 executables, but only a "hello world" will
work if I do that anyway.

> > You don't have a Win32 target already for your
> > Pascal compiler/programs?
>
> Yes, it is called "Free Pascal" btw, and its IDE is called Lazarus(-IDE),
> following the Delphi mould. Includes gadgets like resource compilers and
> even a CHM helpfile compiler.

Ok, I'm not interested in graphics at the moment.
I just want to get text working at all. Note that
blind people can only handle text, so my target
audience could be blind people.

Around 1987 I had an IBM PC clone with a monochrome
text card, and I am interested in that environment.
I expect to be presented with the same interface,
same commands, just the size of the program I can
edit in micro-emacs changes depending on whether
my processor can address 1 MiB or 4 GiB.

> But win32 is not a retro target, and thus officially only supports still
> supported Windows versions (win8+), with vista and w7 in a kind of grace
> period. (compatibility issues are fixed when reported in release
> candidates). I got report that most basic functionality however still works
> on w2000 and XP, including the 3Mloc IDE.
>
> Since 2015 it switched to mostly use -W functions and thus dropped win9x
> compatibility, since 2020 it uses SEH for exception handling.

Couldn't this have been abstracted? Windows
already has this abstraction, doesn't it?

I see this in my windows.h (in PDOS):

#define CreateDirectory CreateDirectoryA

If you just call CreateDirectory, then that will
resolve (in other environments) to either A or W
as required. Note that you could have an X instead
of W and support 32-bit Unicode, if you were to
rebuild PDOS/386. Currently I only support single
byte - even wchar_t will give you a single byte.

> In total there are 5 windows targets
>
> - 16-bit Win3.x

Surely if this ancient environment is still supported,
then PDOS/386 is just a slight variation of this plus
Win32, and if you do that as a target, you will pick
up Win95 et al too.

> - win32, see above
> - win64(x86_64 and experimental ARM64, e.g. RPI4), shares 99.9% RTL with
> win32.
> - NativeNT(going to ntdll, used for device drivers and other NT system
> applets)
> - wince (i386 and ARM), in decline.
>
> The compiler also had its "hello world" moment on Itanium, and then x86_64
> happened :-) The core missing active one is WinRT, the Windows "apps"
> format.

If you can have a "hello world" on Itanium, why
not Win95, or even better, PDOS/386 (using the
Win32 API, not the 32-bit MSDOS API)?

> There are several dos targets too in varying degrees of decomposition:
> - the main 32-bit target go32v2, based on the go32 V2 extender that DJGPP
> also uses.
> - the main 16-bit dos target "msdos" (with 6 memory models). Newly released
> in 2020:-P !!
> - OS/2 EMX, somewhat deprecated after the native OS/2 target emerged.
> - watcom extender worked for a while too.

Ok, with all these supported platforms, the
code is probably already structured to support
a "new" platform like basic Win32.

> > I may well be able to support it, but it would
> > seem strange to do so when you can produce a
> > Win32 executable that runs, or can run, on
> > almost every single computer and OS since
> > around 1990.
>
> The advantage of the old dos extenders is that they are fairly static,
> while most windows compilers slowly modernize as Windows moves on. E.g.
> using unicode functions.

Win95 is static, isn't it? Or is the problem
you don't have control of the compiler?

BTW, as of last night, gccwin is confirmed to
be a native Windows compiler, not requiring
Cygwin or an existing C compiler. It's a very
simple setup. It's available at http://pdos.org
I walked a non-programmer through the setup
online.

BFN. Paul.

 

Complete thread:

Back to the forum
Board view  Mix view
22632 Postings in 2109 Threads, 402 registered users, 319 users online (0 registered, 319 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum