Recent

Author Topic: Free Pascal on 16 bit ELKS Linux  (Read 1899 times)

toncho11

  • New member
  • *
  • Posts: 9
Free Pascal on 16 bit ELKS Linux
« on: May 25, 2024, 11:10:06 am »
Hi,

ELKS Linux https://github.com/ghaerr/elks is a well supported 16 bit OS. I mean it is under active development. I like it a lot :). Would it be possible to port the Free Pascal 16 bit compiler to ELKS Linux?

domasz

  • Hero Member
  • *****
  • Posts: 553
Re: Free Pascal on 16 bit ELKS Linux
« Reply #1 on: May 25, 2024, 11:26:48 am »
I kinda see no point in this OS. 64bit ARM processors are dirt cheap so why bother with 16 bit?

toncho11

  • New member
  • *
  • Posts: 9
Re: Free Pascal on 16 bit ELKS Linux
« Reply #2 on: May 25, 2024, 01:01:23 pm »
Ha-ha-ha  :D

Because it is cool? There are many people like me who are retro computer fans. Obviously it is not about cheap. Actually retro computing can be expensive  :D
It is about the fun of programming with low amount of memory, optimize your code, etc. Relive the old days!
Pascal was used on the national contests in informatics back then in my country.

MarkMLl

  • Hero Member
  • *****
  • Posts: 8039
Re: Free Pascal on 16 bit ELKS Linux
« Reply #3 on: May 25, 2024, 03:12:01 pm »
I sympathise with that. Now and again somebody with significant "geek cred" comes across Turbo Pascal running on DOS or even CP/M-80 and raves about it in public: Pascal needs (but is rapidly losing) all the friends it can muster and "I see no point" does nobody a favour.

Quote
My Wifi232 (along with a copy of Kermit on both sides!) makes moving files between my linux laptop and my Kaypro a snap, so I whipped up a new floppy with a copy of Kermit and TurboPascal on it, and got to work. The fantastic thing about TP is that not only is it a perfectly reasonable programming language, the software is a full IDE that fits in 26KB! It includes a great text editor as well as a compiler with nice debugging features – seriously, programmers these days could learn a thing or two about writing compact software. Imagine a full IDE that fits comfortably in your CPU’s L1 cache?? That was actually one of the biggest surprises of this experience – the edit-compile-debug loop that anyone writing software is so familiar with is really nice on this machine. It’s probably better than my ‘modern’ programming experience when I’m working on less-retro things.

Indirectly via https://hackaday.com/2019/12/10/laptop-like-its-1979-with-a-16-core-z80-on-an-fpga/

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11947
  • FPC developer.
Re: Free Pascal on 16 bit ELKS Linux
« Reply #4 on: May 25, 2024, 06:01:28 pm »
I sympathise with that. Now and again somebody with significant "geek cred" comes across Turbo Pascal running on DOS or even CP/M-80 and raves about it in public: Pascal needs (but is rapidly losing) all the friends it can muster and "I see no point" does nobody a favour.

That is a decision that everybody must make for himself. I'm not attracted to that prospect either.  Ideas are a dime a dozen, somebody doing the hard work is what is usually missing.

domasz

  • Hero Member
  • *****
  • Posts: 553
Re: Free Pascal on 16 bit ELKS Linux
« Reply #5 on: May 25, 2024, 06:12:58 pm »
There are many people like me who are retro computer fans. Obviously it is not about cheap. Actually retro computing can be expensive  :D
It is about the fun of programming with low amount of memory, optimize your code, etc. Relive the old days!
I love retro myself but I just think it would be better to either improve an existing 16 bit OS or create a new one which can run real 16-bit era software.

toncho11

  • New member
  • *
  • Posts: 9
Re: Free Pascal on 16 bit ELKS Linux
« Reply #6 on: May 25, 2024, 08:19:43 pm »
Normally an OS provides a libc that is wrapper for all the kernel functions + some other useful libs as Math.
So one needs to bind Pascal's functions for memory allocation, file system access and console input/output to the ones provided by ELKS' libc. But of course it is a lot of work. I was inspired seeing that Free Pascal supports many platforms.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11947
  • FPC developer.
Re: Free Pascal on 16 bit ELKS Linux
« Reply #7 on: May 26, 2024, 12:35:44 am »
Normally an OS provides a libc that is wrapper for all the kernel functions + some other useful libs as Math.

That is normal for a *nix target. Non Unix (and -emulation) OSes have different rules. E.g. FPC's windows port (Win32/win64) doesn't link to msvcrt.

Quote
So one needs to bind Pascal's functions for memory allocation, file system access and console input/output to the ones provided by ELKS' libc. But of course it is a lot of work. I was inspired seeing that Free Pascal supports many platforms.

Maybe, since it is an *nix. But it will probably take somebody well versed in all matters ELKS to make the decision if that is the best way to go. I guess that since ELKS is  a 16-bit OS, the deviation from the norm will be the rule rather than the exception.

 

TinyPortal © 2005-2018