Win in Pascal

Tell us about your other hobbies & none QL related items here :)
User avatar
Ruptor
Gold Card
Posts: 418
Joined: Fri Dec 20, 2019 2:23 pm
Location: London

Win in Pascal

Post by Ruptor »

I reply here to stop the tangent off the Mandlebrot topic that needs cleaning up.
NormanDunbar wrote:Windows? Pascal? Are you sure, because I was of the understanding that it was Macintosh no Windows. I've not found anything online about windows, but a few about Mac:
We have to be selective and investigate what the Net tells us or doesn't tell us. MS had to get Win out quickly so why use Pascal calling conventions if you were not going to interface MS DOS to Pascal? C was available but maybe the programmers were not and Pascal ones were and Fortran or Cobol were not a lot of use. Save a few bytes, really, when there was 640 K and we know an OS with a language can fit in 48 K. In those days the secrecy was paranoia about code theft but the Net is biased to the US and the last thing they want to admit is their computer industry is based on European developments. They rediscovered Borrelia and called it Lyme and broke the Enigma code according to parts of the NET. The most annoying one to me is calling 1000 million a billion but what will people 1000 years from now actually think and does any of it really matter? :roll:


User avatar
NormanDunbar
Forum Moderator
Posts: 2251
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: Win in Pascal

Post by NormanDunbar »

I got my information from Tandy Trower who was the guy in charge of getting Windows "out the door" and while he mentioned Pascal, he was referring to Borland Pascal which was killing off Microsoft's Basic compiler both in terms of speed and cost - $60 for Borland Pascal, $400 for MS Basic compiler. He was given a choice of sorting out what to do about Borland (nothing he could!) or taking on the "ejector seat" of Windows manager. He chose the latter especially as most Computer Science graduates had been doing Pascal for years at university.

At no point did he mention Pascal as being what Windows was written in though -- which doesn't mean it wasn't Pascal of course!

https://www.technologizer.com/2010/03/0 ... f-windows/ if you fancy a short read.

Cheers,
Norm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
User avatar
Ruptor
Gold Card
Posts: 418
Joined: Fri Dec 20, 2019 2:23 pm
Location: London

Re: Win in Pascal

Post by Ruptor »

NormanDunbar wrote:At no point did he mention Pascal as being what Windows was written in though -- which doesn't mean it wasn't Pascal of course!
Had a quick look and thought this quote fits the bill.
"While Microsoft had its own version of Pascal, it had been groomed as a professional developer’s tool, and in fact was the core language Microsoft wrote many of its own software products in before it was displaced by C."
Perhaps Windows wasn't considered a development. :lol:


User avatar
mk79
QL Wafer Drive
Posts: 1349
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

Re: Win in Pascal

Post by mk79 »

Ruptor wrote:Save a few bytes, really, when there was 640 K and we know an OS with a language can fit in 48 K.
I don't go round just claiming stuff, my source is one of the most well known Microsoft developer on the net https://devblogs.microsoft.com/oldnewth ... 0/?p=41213

By the way, he's been posting a new blog post every weekday since 2003. And I've been reading every single post of his since 2004... that makes roughly 4500 posts, wow.


User avatar
XorA
Site Admin
Posts: 1358
Joined: Thu Jun 02, 2011 11:31 am
Location: Shotts, North Lanarkshire, Scotland, UK

Re: Win in Pascal

Post by XorA »

mk79 wrote:
Ruptor wrote:Save a few bytes, really, when there was 640 K and we know an OS with a language can fit in 48 K.
I don't go round just claiming stuff, my source is one of the most well known Microsoft developer on the net https://devblogs.microsoft.com/oldnewth ... 0/?p=41213

By the way, he's been posting a new blog post every weekday since 2003. And I've been reading every single post of his since 2004... that makes roughly 4500 posts, wow.
Nice blog!

I guess 68k programmers forget about stack cleanup as its so simple on 68k given its massive number of spare address registers (compared to x86).


User avatar
mk79
QL Wafer Drive
Posts: 1349
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

Re: Win in Pascal

Post by mk79 »

XorA wrote:Nice blog!
Indeed, I learned a ton there. It's just a pity that in one of the many server moves the comments were lost as the blog attracted a very interesting crowd and the comments were a treasure trove of information in themselves.
I guess 68k programmers forget about stack cleanup as its so simple on 68k given its massive number of spare address registers (compared to x86).
I think passing things on the stack is not really "a thing" on QDOS systems anyway, unless you write a compiler. I learned most about it when I started programming on other systems IIRC.


User avatar
M68008
Trump Card
Posts: 223
Joined: Sat Jan 29, 2011 1:55 am
Contact:

Re: Win in Pascal

Post by M68008 »

No need for conspiracy theories, API calling conventions are not a language and can be chosen independently. This is especially true if you own both the APIs and compilers, although I think major C compilers have been supporting multiple calling conventions for a long time.

Had the goal been to easily implement those old APIs in Pascal, they would probably have used Pascal-style strings (like MacOS has done for a long time) rather than C-style strings.
Last edited by M68008 on Sun Jan 30, 2022 10:04 pm, edited 1 time in total.


User avatar
M68008
Trump Card
Posts: 223
Joined: Sat Jan 29, 2011 1:55 am
Contact:

Re: Win in Pascal

Post by M68008 »

Btw, some early sources related to early Windows/MSDOS can be found here:

MSDOS 2.0: https://github.com/microsoft/MS-DOS/tree/master/v2.0
Windows File Manager: https://github.com/Microsoft/winfile


User avatar
mk79
QL Wafer Drive
Posts: 1349
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

Re: Win in Pascal

Post by mk79 »

Another interesting anecdote regarding "code size does matter": https://devblogs.microsoft.com/oldnewth ... 0/?p=42203


User avatar
mk79
QL Wafer Drive
Posts: 1349
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

Re: Win in Pascal

Post by mk79 »

M68008 wrote:Windows File Manager: https://github.com/Microsoft/winfile
Last check-in 2 days ago :D :D :D Somebody is working on it, amazing. And all C... your argument that the Windows API at no point uses Pascal strings is a good one, too.


Post Reply