Re: [Freedos-user] Assembly Language and BASIC

2022-07-11 Thread Ralf Quint

On 7/11/2022 5:33 PM, Rugxulo wrote:



Which makes me wonder if it would be
possible to do such a "back port" from the sources of one of the earlier
versions of FPK,at least those that started to be self-compiling, before
the more widespread adaptations of Delphi'isms :?

I highly doubt it. Free Pascal started by using  so-called "Go32v1"
[sic], aka bits from DJGPP, to be a 32-bit "Turbo" Pascal compiler for
DOS. The first public releases were 1995 or so.
I was using the very early version of FPK. It was written in 
Turbo/Borland Pascal 7, and the very first versions were just a BP7 
compatible compiler, 16 bit application, generating 386 code, while BP7 
could do 8086 and 80286 only. It took about 2 years before the compiler 
became a) self-hosting and b) memory structures were enlarged and it 
started using the Go32 extender.


And that version, just when the switch to Go32 was being made, should be 
a good starting point for a 16bit compiler, generating 16bit Borland 
Pascal compatible code. Not sure if there is enough info still around to 
make it even TPU compatible. It would be different from the goal set 
back then, and not sure if Florian would still have that source code 
(that was well before SourceForge and Github).


Ralf



___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] Assembly Language and BASIC

2022-07-11 Thread Rugxulo
Hi,

On Mon, Jul 11, 2022 at 1:04 PM Ralf Quint  wrote:
>
> GNU's GPC was just a crutch, a unwanted step-child, that didn't even get
> a fraction of the attention that it should have gotten early on.

GPC was written in C ... unlike FPC. This was way before GCC 4.8
(2013), when everything switched to C++. I think they had trouble with
various backends or maybe also just lack of time for continued
maintenance required by GCC upstream.

"For the purposes of making releases, however, we will consider
primarily C and C++, as those are the languages used by the vast
majority of users."

(That doesn't mean they're unsympathetic to everything else, just that
they clearly focus on C and C++ first.)

> That's what resulted in Florian Klämpfl's early  Open Source implementation of
> FPK (Florian's Pascal Kompiler), which started as a (pretty well made)
> i386 generating Turbo Pascal compatible compiler, before following the
> path set by Borland/Inprise/Codegear/Embarcadero with their Delphi
> implementation of Object Pascal. Unfortunately, there seems to be very
> little interest in doing a backport of FreePascal into a 16bit , Turbo
> Pascal compatible compiler for DOS.

I still sometimes use Oberon/M 1.2 (circa 1991) for DOS. It's somewhat
weak (and needs a linker) but works fairly well and supports 8086
(host and target).

* http://www.vectorbd.com/bfd/hll/
* http://www.vectorbd.com/bfd/hll/obernm12.zip

> The 8086 target version of FPC is still a cross-compiler with demanding 
> resources which prevent it from
> running on (Free)DOS itself.

It can run under FreeDOS with Japheth's HX (yes, I've tried 3.2.2).

> Which makes me wonder if it would be
> possible to do such a "back port" from the sources of one of the earlier
> versions of FPK,at least those that started to be self-compiling, before
> the more widespread adaptations of Delphi'isms :?

I highly doubt it. Free Pascal started by using  so-called "Go32v1"
[sic], aka bits from DJGPP, to be a 32-bit "Turbo" Pascal compiler for
DOS. The first public releases were 1995 or so. After 1998 (and
0.99.5), they stopped being "Turbo Pascal only" and started adding in
Delphi stuff. The big cleanup and rewrite was 2.0.0 in 2005. I don't
think it even worked on DOS again until 2008 (2.2.2, the oldest one
still on iBiblio). We're lucky to have it!

There's also p2c, and we have an old DJGPP port (circa 1999). Luckily,
the output code is (mostly?) 16-bit clean and seems to work well with
OpenWatcom. (Technically, you can build p2c itself with OpenWatcom. I
whipped up a simple makefile for that: it works!)


___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] Creating a minimal freeDOS bootable image that runs a single application

2022-07-11 Thread Robert Riebisch
Hi Nico,

> I'm only interested in the files on the USB drive. Also, I'm not sure if 
> this will have to run on EFI machines, my main target is like the 
> 2000s-early 2010s laptops that some people seem to have lying around. My 
> main main target is specifically my laptop from that time period, and if 
> other people use it then that's cool too.

Regarding laptops: Power management might be an issue.

Worst case is the CPU running at full speed sucking all energy from the
battery in under 30 minutes. (Also giving you a lot of noise from the fan.)

Depending on the laptop's hardware have a look at:
- FDAPM and/or IDLEHALT (
- (my tiny) EIDL ()
- HLTIDLE ()
- DOSidle ()

Cheers,
Robert
-- 
BTTR Software   https://www.bttr-software.de/
DOS ain't dead  https://www.bttr-software.de/forum/


___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] Assembly Language and BASIC

2022-07-11 Thread Ralf Quint

On 7/11/2022 5:02 AM, Liam Proven wrote:


There are at least half a dozen generations. Given the ones that have
been adopted outside Wirth's institutions and used in many countries,
there are things that we could call Pascal, Pascal 3 (Modula-2),
Pascal 4 (Oberon), and several different successors to Pascal 4.

There are also non-Wirth variants that had some adoption, including
Modula-2+, Modula-3,Turbo Pascal, Object Pascal, Delphi, Kylix and
FreePascal. All legit, all sold and were widely-used at some points in
time.


Well, real life fact is that Wirth, not once, was involved in developing 
a single, commercially available compiler, for any of his language 
"inventions"/developments. All of Wirth's (or his immediate minions) 
implementations were just sample implementations of his ideas how to 
promote and teach structured programming. That is in contrast with K 
for example, who's C compiler in fact was used to develop real world 
applications (like that thing called Unix :-) )...


In the real world, things sometimes take their own ways, and that was 
certainly the case for any Pascal (or Wirth's ideas) related. The 
University of California at San Diego (UCSD) picked up Wirth's rather 
easily (simple pass) to implement Pascal compiler and combined that with 
the p-System, a virtual machine that had already been developed  at UCSD 
to create what became know as UCSD Pascal. p-System, or p-Machine, stood 
originally for pseudo-System/Machine, as it implemented a virtual 
machine with a pseudo 16bit CPU that could be implemented easily 
cross-platform. Some people started to call it Pascal-System/Machine, 
kind of ignoring the fact that from early on, there also was a quite 
widespread FORTRAN IV compiler, and elusive BASIC compiler (beside the 
mentioning in some UCSD p-System documentation, I have seen it only 
once, on a computer fair in the early/mid'80s, and then never again) and 
apparently an early Ada implementation.
UCSD Pascal was then licensed through UCSD to several OEMs, with the 
most common implementation being Apple Pascal (for the Apple II and 
Apple III) and HP Pascal, and then IBM, for their new IBM PC. At the 
same time, several other compiler companies picked up on the increasing 
popularity of Pascal and offered their own implementations, though 
probably due to the licensing terms of UCSD, which gave pretty much an 
exclusive license to SoftTech (later sold to Cabot, UK, then Pecan, UK) 
for cheap and SoftTech then wanted to charge an arm, half a leg and your 
first born to license the system then from them, were doing all native 
code generation.
One of those was Anders Hejlsberg and his company PolyData, which 
produced Z80 native code, which then was bought by Borland to become 
Turbo Pascal 1.0. Digital Research did their Pascal MT+, also native Z80 
and link compatible with their C compiler (but not CBASIC). DEC did 
their own thing for their VAX/VMS PAscal (late DEC Pascal, then HP 
Pascal, which had no relation to the earlier UCSD based HP Pascal), and 
their are persistent rumors that the PDP-11 and VAX CPU instruction sets 
were "pilfered" from the p-Code from UCSD, but I never used the 
assembler on any of those, so I don't know for sure ;-)
Microsoft has early on their own Pascal, which produced code for their 
own p-Code implementation, the same one they used in their early COBOL 
and FORTRAN compilers, as well as in some applications like Multiplan, 
the predecessor to Excel. They bought a 3rd party Pascal compiler and 
sold it as QuickPascal for a (short) while in order to try and compete 
with Borland, but gave up on that one pretty quick, just like with their 
QuickC attempt, which all got cancelled along with their "full" Pascal 
and COBOL compiler, though Fortran lived a Fortran Powerstation for a 
little bit longer. And there were a few more compiler companies that 
tried (Prospero, Metaware, Metrowerks) but all of them rather failed as 
they either try to be "standards compliant" or were running behind the 
relative fast paced developments at Borland, beside not being able to 
compete on price.


GNU's GPC was just a crutch, a unwanted step-child, that didn't even get 
a fraction of the attention that it should have gotten early on. That's 
what resulted in Florian Klämpfl's early  Open Source implementation of 
FPK (Florian's Pascal Kompiler), which started as a (pretty well made) 
i386 generating Turbo Pascal compatible compiler, before following the 
path set by Borland/Inprise/Codegear/Embarcadero with their Delphi 
implementation of Object Pascal. Unfortunately, there seems to be very 
little interest in doing a backport of FreePascal into a 16bit , Turbo 
Pascal compatible compiler for DOS. The 8086 target version of FPC is 
still a cross-compiler with demanding resources which prevent it from 
running on (Free)DOS itself. Which makes me wonder if it would be 
possible to do such a "back port" from the sources of one of the earlier 
versions of FPK,at 

Re: [Freedos-user] Question about error message / redirecting AUX and PRN?

2022-07-11 Thread Eric Stein
Thanks for the reply. It turns out the software is trying to write to 
the com port on exit, which I'm assuming expects to find a modem there. 
There was a modem connected, but wasn't turned on. With the modem on, I 
don't get the error. Also if there is nothing connected to the port, the 
data is just sent out to nowhere, and there is no error. I'm not sure 
why it is accessing a modem only in certain conditions, but obviously 
this is not a FreeDOS problem.


BTW I did not specifically mention that I'm running this on old hardware 
(Pentium III based) and not a VM. I will ignore the drive messages and 
see what happens. Also it is a Gateway system, so it may have finicky 
stuff going on that a generic system doesn't.


Regards,
Eric

On 7/8/2022 16:29, Eric Auer wrote:


Hi ERIC,

the AUX device usually was the same as COM1, in the same
way that the PRN device usually was the same as LPT1.

If your program tried to read/write AUX, it either
really wanted to do something with the serial port,
or an unrelated bug made it access the wrong file.

According to the FreeDOS kernel sources, AUX is the
first item in the system file table, similar to
file handles 0 to 4 defaulting to CON as stdin,
CON as stdout, CON as stderr, "stdaux" (stdin)
and PRN, respectively.

Note that your luck may vary when it comes to access
to real or emulated serial or parallel ports in the
PC or DOS emulators you may be using today. At least,
you will have to dig into the configuration docs to
find out how to link them to the right device of your
host operating system to make them useful :-)

The message about drives and cylinders probably
refers to a mismatch between your CHS geometry
and what would be plausible based on where your
partitions start and end. The MBR partition table
should better agree with the geometry reported
by the BIOS, but if you have LBA, then DOS will
probably be using LBA instead of CHS anyway, so
warnings about geometry become less relevant.
Regards, ERIC ;-)

PS: You are right that our MODE has LPTn=COMn
redirection but not PRN/AUX redirection. The
kernel source code says MODE should be able to
redirect AUX and PRN, like CTTY redirecting CON?
In MS DOS, the first 3 system file table items
would be AUX, CON and PRN. I guess redirecting
those would involve "just" manipulating the SFT?







___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] Creating a minimal freeDOS bootable image that runs a single application

2022-07-11 Thread Jim Hall
On Mon, Jul 11, 2022 at 3:11 AM Nico via Freedos-user
 wrote:
> I'm only interested in the files on the USB drive. Also, I'm not sure if
> this will have to run on EFI machines, my main target is like the
> 2000s-early 2010s laptops that some people seem to have lying around. My
> main main target is specifically my laptop from that time period, and if
> other people use it then that's cool too.
>


Sounds like that will be fine, then. FreeDOS should run fine on
(circa) 2000 to 2010 hardware, as long as you don't need networking on
your laptop (that may require other work).

But if you're using this as a dedicated "writing system" (for example,
a "distraction free writing environment" like some authors use) then
you probably don't want to use networking anyway (because that's a
distraction).



Jim


___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] Creating a minimal freeDOS bootable image that runs a simple text editor

2022-07-11 Thread Jim Hall
>   Jim Hall said:
>
>  | Let's say you wanted to run FreeDOS EDIT every time FreeDOS boots up.
>  | The full path to EDIT is C:\FREEDOS\BIN\EDIT.EXE, so you would create
>  | a custom FDCONFIG.SYS that probably looked like this:
>  |
>  | FILES=20
>  | BUFFERS=20
>  | SHELL=C:\FREEDOS\BIN\EDIT.EXE
[..]

On Sun, Jul 10, 2022 at 9:59 PM Jose Senna  wrote:
>
>   What if you use the /P switch when loading the shell?
>


The /P switch in FreeCOM says that COMMAND.COM is a permanent shell,
so it never exits (the EXIT command does nothing). That /P
("permanent") feature probably doesn't exist on other applications,
because they don't need it.

In my example, I used the theoretical example of running a different
application (FreeDOS EDIT) as the shell. You can actually run any
program as the shell, but whether or not that is a good idea is up to
you. For example, if you needed to launch other programs *before* the
dedicated app, then running the program as your shell is not a good
idea.


___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] Assembly Language and BASIC

2022-07-11 Thread Travis Siegel



On 7/11/2022 8:59 AM, Rugxulo wrote:

Hi,

They all have different purposes and implementations. I'm not
complaining (much). But Wirth himself doesn't use anything except
Oberon-07 anymore.

I read somewhere once that Wirth said that oberon was what pascal was intended 
to be.


I can't remember where I saw that, but if it's a true statement, it 
means he was working towards the final goal the whole time, and perhaps 
politics got in the way.





___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] Assembly Language and BASIC

2022-07-11 Thread TK Chia

Hello Liam Proven,

[re Pascal, Modula, etc.]


You [Rugxulo] also said: >> (So it was too many competing languages, 
honestly.)> Also not really

fair.> I mean, arguably, yes, but there are also dozens of variants of
C.> There's original C, K C, Plan 9 C, ANSI C, C 99, C11, C17 and soon
C23.> All are C. All are different. Code from one may not work in others.

And of course there is Limbo, Go, C++, C#, D, and myriad variants.


Not quite.  There is a clear difference between a "dialect" of C, and a
language that is only kind of "influenced" by C.  In brief, any compiler
that claims to be a "C compiler" --- including GCC, the Intel C
compiler, or even Plan 9's C compiler --- had better be able to compile

  #include 
  int main()
  {
printf("Hello world!");
return 0;
  }

into a program that actually prints "Hello world!".

In contrast, we do not expect (say) a Java, Go, or C# compiler to accept
the above program, or even to make it print "Hello world!".  Because
Java is not a dialect of C, and does not claim to be one.

Thank you!

--
https://gitlab.com/tkchia


___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] Assembly Language and BASIC

2022-07-11 Thread Rugxulo
Hi,

On Mon, Jul 11, 2022 at 7:04 AM Liam Proven  wrote:
>
> On Fri, 8 Jul 2022 at 21:35, Rugxulo  wrote:
> >
> > Everybody and their brother made Pascal derivatives: Ada, Modula-2,
> > Modula-3, etc. While Dr. Wirth was not directly involved, there was
> > also a newer "Extended" Pascal standard in 1988 (ISO 10206) that also
> > had modules. But even Wirth kept going and started developing Oberon
> > in 1986. "Standard" Modula-2 (N.B. GNU GM2) came in 1996 (ISO 10514).
> > (So it was too many competing languages, honestly.)
>
> I think this is a misrepresentation and unfair.
>
> Pascal was just one point in a continuous series of work by Prof.
> Wirth and his associates.
>
> As it happens, the computer industry seized on some of these, made
> multiple 3rd party compilers, many with proprietary extensions. So you
> say "Dr Wirth was not involved" as a global statement which is not
> true.

Sorry, I meant specifically that he wasn't involved in either Extended
Pascal or Modula-3 (although he attended one of their meetings). He
wasn't directly involved in any standardization, AFAIK. His personal
compilers that he wrote were for original Pascal, PIM Modula-2, and
Oberon (original, -07).

> Prof. Wirth's work goes:
>
> (Prehistory of Pascal: he was involved in the committee to modernise
> ALGOL-60. His proposals were rejected, in favour of more complex ones
> from  Adriaan van Wijngaarden, whose revised language became ALGOL-68
> and which more or less sank ALGOL as a language.)

Yes, Algol W. There's a third-party Linux transpiler for it. (He also
wrote Euler and PL/360.)

> Wirth took his proposals and made his own language, which he renamed Pascal.
>
> That got widely used and adopted.

They literally gave away P4 (subset) sources to help propagate the
Pascal language.

> Wirth refined and worked on the language further and created Modula.
>
> (So in a way, Modula was Pascal 2.0.)
>
> Modula was not a success. He quickly moved on and made Modula-2. That
> did quite well for a while. It was significant on DOS PCs in the early
> days; JPS Topspeed Modula-2 was the fastest native-code compiler on
> the PC and did well for a while. Acorn attempted to build the OS for
> its new CPU, the ARM, in Modula-2.

Yes, Modula-2 was a true successor to Pascal (with minor differences
and many refinements).

JPI was a spinoff of Borland.

> So, Modula-2 can be seen as Pascal 3.0.
>
> Then others took Modula-2 and extended it, to make Modula-3, but that
> was nothing to do with Wirth.

Modula-3 was actually the cleaned-up successor to Modula-2+ [sic]. It
was mostly developed at DEC.

> Next Wirth built Oberon (1987).
>
> Oberon is sort of Pascal 4.
>
> Oberon is still around and still in use so it's arguably proved to be
> a survivor.

Oberon-07 is Wirth's latest dialect. There are several third-party
compilers for it.

> Then it gets really complicated.
>
> One line goes Oberon -> Object Oberon -> Oberon 2 -> Oberon/L  ->
> (renamed to) Component Pascal

I'm not aware of any "Object Oberon" implementations. (Or did that
inspire "Active Oberon"?)

> Another line of development was:
> Oberon -> Oberon-07
>
> Another line of development was:
>
> Oberon -> Active Oberon -> Zonnon
>
> Wirth was involved with several of these, as he refined and
> reconsidered his ideas.

I believe Zonnon was mostly Jurg Gutknecht's work.

> You also said:
> > (So it was too many competing languages, honestly.)
>
> Also not really fair.

1982 was "standard" Pascal. 1984 was Byte's big issue on Modula-2. And
then Oberon was created in 1986. That's a lot of overlap and confusing
(especially in light of Ada, C, and others).

> I mean, arguably, yes, but there are also dozens of variants of C.
>
> There's original C, K C, Plan 9 C, ANSI C, C 99, C11, C17 and soon C23.

C17 is just minor fixes and clarifications to C11. Plan 9's
differences are minor, IIRC.

> All are C. All are different. Code from one may not work in others.
>
> And of course there is Limbo, Go, C++, C#, D, and myriad variants.
>
> All are forms of C with extensions and occasionally removals or
> refinements or deprecations.

GCC does have a D frontend nowadays, but I wouldn't call that "C with
extensions". In fact, Walter had a sort of in-between from C to D
called "betterC".

> Some of them are hugely popular and widely-used, e.g. C++, but are
> nothing to do with C's original designers.

C++ is meant to be as compatible as possible with C. So it is possible
to compile code with both. As you know, originally it was a transpiler
into C code.

> Some are directly from C's designers but are obscure, such as Plan 9 C
> and Limbo.
>
> Some are directly from C's designers but also are big successes, such as Go.

C was mostly Dennis Ritchie's work.

Go is very different (garbage collection) but also inspired by Oberon.
It's meant to be a better, safer systems language than C.

> It's not possible to say which is more "real"  or legitimate. There is
> no single coherent version numbering 

Re: [Freedos-user] Assembly Language and BASIC

2022-07-11 Thread Liam Proven
On Fri, 8 Jul 2022 at 21:35, Rugxulo  wrote:
>
> Everybody and their brother made Pascal derivatives: Ada, Modula-2,
> Modula-3, etc. While Dr. Wirth was not directly involved, there was
> also a newer "Extended" Pascal standard in 1988 (ISO 10206) that also
> had modules. But even Wirth kept going and started developing Oberon
> in 1986. "Standard" Modula-2 (N.B. GNU GM2) came in 1996 (ISO 10514).
> (So it was too many competing languages, honestly.)

I think this is a misrepresentation and unfair.

Pascal was just one point in a continuous series of work by Prof.
Wirth and his associates.

As it happens, the computer industry seized on some of these, made
multiple 3rd party compilers, many with proprietary extensions. So you
say "Dr Wirth was not involved" as a global statement which is not
true.

Prof. Wirth's work goes:

(Prehistory of Pascal: he was involved in the committee to modernise
ALGOL-60. His proposals were rejected, in favour of more complex ones
from  Adriaan van Wijngaarden, whose revised language became ALGOL-68
and which more or less sank ALGOL as a language.)

Wirth took his proposals and made his own language, which he renamed Pascal.

That got widely used and adopted.

Wirth refined and worked on the language further and created Modula.

(So in a way, Modula was Pascal 2.0.)

Modula was not a success. He quickly moved on and made Modula-2. That
did quite well for a while. It was significant on DOS PCs in the early
days; JPS Topspeed Modula-2 was the fastest native-code compiler on
the PC and did well for a while. Acorn attempted to build the OS for
its new CPU, the ARM, in Modula-2.

So, Modula-2 can be seen as Pascal 3.0.

Then others took Modula-2 and extended it, to make Modula-3, but that
was nothing to do with Wirth.

Next Wirth built Oberon (1987).

Oberon is sort of Pascal 4.

Oberon is still around and still in use so it's arguably proved to be
a survivor.

Then it gets really complicated.

One line goes Oberon -> Object Oberon -> Oberon 2 -> Oberon/L  ->
(renamed to) Component Pascal

Another line of development was:
Oberon -> Oberon-07

Another line of development was:

Oberon -> Active Oberon -> Zonnon

Wirth was involved with several of these, as he refined and
reconsidered his ideas.


You also said:
> (So it was too many competing languages, honestly.)

Also not really fair.

I mean, arguably, yes, but there are also dozens of variants of C.

There's original C, K C, Plan 9 C, ANSI C, C 99, C11, C17 and soon C23.

All are C. All are different. Code from one may not work in others.

And of course there is Limbo, Go, C++, C#, D, and myriad variants.

All are forms of C with extensions and occasionally removals or
refinements or deprecations.

Some of them are hugely popular and widely-used, e.g. C++, but are
nothing to do with C's original designers.

Some are directly from C's designers but are obscure, such as Plan 9 C
and Limbo.

Some are directly from C's designers but also are big successes, such as Go.

It's not possible to say which is more "real"  or legitimate. There is
no single coherent version numbering system. Different compilers have
nearly-but-not-completely overlapping subsets, e.g. Intel C and GCC
and Clang.

It's complicated. If you exclude ones from from the AT team as not
really being C then you exclude many of the most important variants.

It's arguably too many language but nobody says that of it.

Well, the Pascal line is the same.

There are at least half a dozen generations. Given the ones that have
been adopted outside Wirth's institutions and used in many countries,
there are things that we could call Pascal, Pascal 3 (Modula-2),
Pascal 4 (Oberon), and several different successors to Pascal 4.

There are also non-Wirth variants that had some adoption, including
Modula-2+, Modula-3,Turbo Pascal, Object Pascal, Delphi, Kylix and
FreePascal. All legit, all sold and were widely-used at some points in
time.

You can't say that there are too many Pascal variants unless you also
say that there are too many C variants.

-- 
Liam Proven ~ Profile: https://about.me/liamproven
Email: lpro...@cix.co.uk ~ gMail/gTalk/FB: lpro...@gmail.com
Twitter/LinkedIn: lproven ~ Skype: liamproven
UK: (+44) 7939-087884 ~ Czech [+ WhatsApp/Telegram/Signal]: (+420) 702-829-053


___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] Creating a minimal freeDOS bootable image that runs a simple text editor

2022-07-11 Thread Jerome Shidel
Hi, 

My 2 cents worth…

Like Mateusz mentioned… There is no guarantee that the BIOS will permit disk 
writes to a booted USB stick. However since you intend on supporting only your 
personal machines, you can just do a quick test and not worry about that. A 
quick and dirty test would be to burn the FreeDOS install media to USB, boot 
it, create a file, reboot and verify it still exists. 

Assuming you can write to a booted USB… I’d keep using FreeCOM and just start 
with a clean FDCONFIG and FDAUTO and minimal drivers. Probably, very 
conservative memory and a mouse driver. Then for FDAUTO, just run your editor. 
However after the editor, perform a system shutdown. 

Probably something like this…

FDCONFIG.SYS

!COUNTRY=001,858:\COUNTRY.SYS
!LASTDRIVE=Z
!BUFFERS=20
!FILES=80
DOS=HIGH
DEVICE=\FREEDOS\BIN\HIMEMX.EXE
SHELL=\COMMAND.COM \ /E:1024 /P=\FDAUTO.BAT

FDAUTO.BAT
——
@echo off
set DOSDRV=C:
set DOSDIR=%DOSDRV%\FREEDOS
set PATH=%DOSDIR%\BIN
set TEMP=%DOSDRV%\TEMP
CTMOUSE
EDIT
FDAPM POWEROFF
ECHO System failed to power off. Please turn it off manually now.


However if you need CD/DVD support or some other functionality provided by the 
normal FreeDOS boot configurations, I would just add the specifics to the end 
of the normal FDAUTO.BAT file.

:-)

Jerome

___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] Assembly Language and BASIC

2022-07-11 Thread Travis Siegel


On 7/11/2022 2:49 AM, Rugxulo wrote:

Hi,
GNU Pascal's main claim to fame (besides "Borland Pascal 7" support)
was also supporting both ISO standards (7185, 10206). There are DJGPP
builds available. But GNU Pascal hasn't been maintained in many years.
Still, it works!
I made a stab at getting GPC to compile on later versions of GCC several years 
ago, but never got past the hurtle of getting it to compile in the first place. 
 I had too much trouble getting the version of gcc it needed to work.


Fixing it would be a relatively simple task, (compile with last known 
working version of gcc, install next version, fix errors, recompile, 
repeat as necessary to get to last version of gcc), but I couldn't ever 
get it to compile properly.  I had the same problem with Gnu Modula-2, 
never could get a working version of that out of the source distributions.


Free pascal does an excellent job, but it's never bad to have options.

Perhaps I'll make another attempt, don't wish to maintain it, just to 
get it working with later gcc versions, perhaps at that point someone 
else can pick up it's maintainance.





___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] Creating a minimal freeDOS bootable image that runs a single application

2022-07-11 Thread Nico via Freedos-user

On 11/07/2022 03:56, Bob Pryor wrote:

Hi Nico,
Are you interested in access to system hardware and files?
Or simply your editor and the files you are using on the usb drive?
And UEFI could be a problem if you are thinking of hardware not in your 
control.
FreeDOS _might_ boot anywhere with a keyboard and compatible video, with 
your usb as C: or A:.

Bob


On Sun, Jul 10, 2022 at 5:05 PM Nico via Freedos-user 
> wrote:


hi,
I would like to create a minimal bootable image for a USB drive (or
other formats, maybe even floppies, but USB is the focus) that boots
into a single application (in my case, a custom minimal word processor,
although freeDOS EDIT is a decent start for what I want) to create a
kind of "typewriter on a USB drive", that will work on any hardware you
throw it at and provide an environment for writing in. (I understand
that this is very niche)

freeDOS seemed like an ideal platform for this to me, as it seems
small,
boots very fast, runs on all kinds of PC hardware, lets me develop my
application in C without having to go bare-metal, etc.

I understand that freeDOS can be installed from a booted USB drive, but
could I create a custom USB image that, instead of containing the
installer, contains my small word processor which starts at boot? Or is
freeDOS not a good base for this utility?

Thanks,
nico


___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/freedos-user




___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


I'm only interested in the files on the USB drive. Also, I'm not sure if 
this will have to run on EFI machines, my main target is like the 
2000s-early 2010s laptops that some people seem to have lying around. My 
main main target is specifically my laptop from that time period, and if 
other people use it then that's cool too.



___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] Assembly Language and BASIC

2022-07-11 Thread Ralf Quint

On 7/10/2022 11:49 PM, Rugxulo wrote:

Hi,

On Fri, Jul 8, 2022 at 7:44 PM Ralf Quint  wrote:

On 7/8/2022 4:26 PM, Rugxulo wrote:

Turbo Pascal debuted in 1983 with support for CP/M and DOS via .COM
files (max. 64k size). When they dropped CP/M and .COM support in TP 4
(1987), then they were able to use separate "units" and DOS .EXEs for
larger code. (But TP 3 could still address 1 MB with the heap.) There
were other complications, too.

Not quite sure what you are trying to say here.

I think (?) I was mostly trying to say that Turbo Pascal's CP/M
support and 64k .COM output (even in 1986) didn't really help DOS
achieve its full potential. The Commodore C128 came out in 1985 and
could run CP/M. I've seen at least one YouTube video of it running
Turbo Pascal.
Rather to the contrary. You must realize that at that time, regardless 
of the size of programs (beside, as I mentioned, Turbo Pascal 3.0 could 
do overlays), it incredibly helped DOS to become more popular. It was 
multiple times faster than any other compiler and with $60, it was at 
least 5-6x cheaper than the next best compiler. Only DeSmet C was even 
remotely in the same price range, Mix/Power C was just becoming known. 
And in those early '80s, for most home users, PCs with less than 512KB 
of RAM where quite common. That only changed in the mid'80s and by that 
time,Turbo Pascal 4.0 was out. And Turbo C, Turbo BASIC, etc...



Never used Prospero Pascal

I'm not sure of the details, but AFAIK they were the main vendor
pushing "Extended" Pascal (ISO 10206), even for DOS. Instead of just
"level 0" and "level 1", their compiler also had "level 2"
(exceptions?) and "level 3" (classes?).

* http://www.edm2.com/index.php/Prospero_Pascal
I know/knew about it, but as I mentioned before, those Pascal standards 
were rather detrimental to the spread of Pascal. Hence it was of very 
little interest to me...

GNU Pascal's main claim to fame (besides "Borland Pascal 7" support)
was also supporting both ISO standards (7185, 10206). There are DJGPP
builds available. But GNU Pascal hasn't been maintained in many years.
Still, it works!

* https://www.gnu-pascal.de/gpc/h-index.html


That Borland Pascal "support" is more marketing than useful feature. And 
again, in practice, nobody was giving a hoot about those standards.



Ralf




___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] Creating a minimal freeDOS bootable image that runs a single application

2022-07-11 Thread Ralf Quint

On 7/10/2022 2:46 PM, Nico via Freedos-user wrote:

hi,
I would like to create a minimal bootable image for a USB drive (or 
other formats, maybe even floppies, but USB is the focus) that boots 
into a single application (in my case, a custom minimal word 
processor, although freeDOS EDIT is a decent start for what I want) to 
create a kind of "typewriter on a USB drive", that will work on any 
hardware you throw it at and provide an environment for writing in. (I 
understand that this is very niche)


freeDOS seemed like an ideal platform for this to me, as it seems 
small, boots very fast, runs on all kinds of PC hardware, lets me 
develop my application in C without having to go bare-metal, etc.


I understand that freeDOS can be installed from a booted USB drive, 
but could I create a custom USB image that, instead of containing the 
installer, contains my small word processor which starts at boot? Or 
is freeDOS not a good base for this utility? 

Not quite sure what exactly your problem is?

Just create a basic bootable USB stick and start whatever application 
you like in the autoexec.bat...



Ralf




___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] Assembly Language and BASIC

2022-07-11 Thread Rugxulo
Hi,

On Fri, Jul 8, 2022 at 7:44 PM Ralf Quint  wrote:
>
> On 7/8/2022 4:26 PM, Rugxulo wrote:
> >
> > Turbo Pascal debuted in 1983 with support for CP/M and DOS via .COM
> > files (max. 64k size). When they dropped CP/M and .COM support in TP 4
> > (1987), then they were able to use separate "units" and DOS .EXEs for
> > larger code. (But TP 3 could still address 1 MB with the heap.) There
> > were other complications, too.
> Not quite sure what you are trying to say here.

I think (?) I was mostly trying to say that Turbo Pascal's CP/M
support and 64k .COM output (even in 1986) didn't really help DOS
achieve its full potential. The Commodore C128 came out in 1985 and
could run CP/M. I've seen at least one YouTube video of it running
Turbo Pascal.

> Never used Prospero Pascal

I'm not sure of the details, but AFAIK they were the main vendor
pushing "Extended" Pascal (ISO 10206), even for DOS. Instead of just
"level 0" and "level 1", their compiler also had "level 2"
(exceptions?) and "level 3" (classes?).

* http://www.edm2.com/index.php/Prospero_Pascal

GNU Pascal's main claim to fame (besides "Borland Pascal 7" support)
was also supporting both ISO standards (7185, 10206). There are DJGPP
builds available. But GNU Pascal hasn't been maintained in many years.
Still, it works!

* https://www.gnu-pascal.de/gpc/h-index.html


___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] Assembly Language and BASIC

2022-07-11 Thread Rugxulo
Hi,

On Fri, Jul 8, 2022 at 6:30 PM Ralf Quint  wrote:
>
> With C(++), it's more like "let's throw everything in one big pot and
> then lets see what we actually need in our program". A huge advantage of
> Turbo/Borland Pascal, Delphi and FreePascal is that they are all capable
> of "smart-linking". The compiler/linker is doing a lot of the work that
> in the other languages is part of the responsibility of the programmer.
> And more and more of them don't care, that's why we have to deal with so
> much software bloat...

Everything after C89 got much bigger, e.g. printf(). That's why things
like IA16-ELF have "-mnewlib-nano-stdio" flags.

I modified a very simple program of mine to avoid printf() entirely,
and it was noticeably smaller. You really shouldn't have to link
everything in just to print out chars, strings, and integers.
(Pascal's write() is much simpler and safer to use but less dynamic at
runtime.)

To be fair, GNU ld does support -ffunction-sections -fdata-sections
-Wl,--gc-sections ... it even seems to (barely) work for DJGPP (COFF)!

UPX helps a ton, too. But nothing's perfect.


___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] Creating a minimal freeDOS bootable image that runs a single application

2022-07-11 Thread Mateusz Viste

On 10/07/2022 23:46, Nico via Freedos-user wrote:
I would like to create a minimal bootable image for a USB drive (or 
other formats, maybe even floppies, but USB is the focus) that boots 
into a single application (in my case, a custom minimal word processor, 
although freeDOS EDIT is a decent start for what I want) to create a 
kind of "typewriter on a USB drive", that will work on any hardware you 
throw it at and provide an environment for writing in.


FreeDOS won't work on non-BIOS machines. Also, the ability to 
write-access the USB drive after boot is not guaranteed, depending on 
the exact BIOS implementation.


Since you say the target is to use "any hardware", I assume you have 
mostly current hardware in mind. Hence no, FreeDOS is probably not a 
very good choice in my opinion.


You mention that you plan to write the application yourself, and that 
you'd like it to boot as fast as possible. With such constraints, 
programming an UEFI (EFI PE) application might perhaps be a good (and 
challenging) choice.


Mateusz


___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user