> Will Embedded Pascal open /dev/  files ?
>

Yes.  The Pascal I/O run-time is a portability layer. Ffor Linux and NuttX
it uses standard C library calls.  It does use C buffered  I/O  (fopen,
fread, fwrite, etc.) which may not be ideal for some kinds of device I/O.
An alternative I/O run-time based on non-buffered I/O (open, read, write,
etc.) would probably be better and not difficult to do at all.



That run-time code is here:
https://github.com/patacongo/Pascal/blob/main/insn16/libexec/libexec_sysio.c#L1298



I haven't considered hard-realtime with an interpreter.  t I think this
effort is more in line with a hobbyist's interests.  Performance on a
desktop, even under the simulator, is really very good and appears to be on
par with native code; but I assume there could be performance issues when
it runs on a lower performance platform.



Calling it "interpreted" is misleading.  The source code is compiled,
optimized, and linked into an ELF-like executable format.  So what is
interpreted is machine language for a made up CPU.  I have other emulated
machine architectures that are not in the repository currently (too much to
maintain).  Translating the code to run natively on ARM or RISC-V is
possible, just not as interesting to me.



The history of Pascal is interesting.  Invented by Niklaus Wirth
https://en.wikipedia.org/wiki/Niklaus_Wirth it became widely popular until
destroyed by Brian Kernighan
https://www.cs.virginia.edu/~evans/cs655/readings/bwk-on-pascal.html .
Modern Pascal has resolved all of these issues, but it is no longer a
language in wide use.  It was widely used not too long ago with Borland
Turbo Pascal and Delphi.  There is a modest following for contemporary
FreePascal/Lazarus.  Then there is GNU Pascal, but I haven’t heard any kind
words for GNU Pascal.

Reply via email to