Re: Questions about using FreePascal to Write Bootloader and Kernel

Dr Engelbert Buxbaum <[email protected]> Fri, 16 Dec 2022 16:45:30 +0100
Newsgroups alt.comp.lang.pascal
Organization private
Message-ID <[email protected]>
In article <[email protected]>, [email protected] says...
> 
> Are there any FreePascal tools or libraries that allow one to write 
> directly to the hardware rather than just to the OS?

Turbo-Pascal under DOS could do that with the PORT-statement, but under 
Windows only drivers running in kernel-space have the right to access 
the hardware. When that change came along (Win-95 or -98, IIRC) it 
caused problems with measuring devices that used the printer status bits 
on the Centronics port to communicate with a computer (there even was a 
chip for the interface that split 8-bit data into two 4-bit nibbles and 
handled the communication protocol).

As far as I know, the early Apple operating system was writen in Pascal 
and assembler. There also was 4DOS (replacement for command.com under 
DOS), which was originally written in TP and assembler (now C and 
assembler, https://4dos.info/sources.htm).

I don't think it would be possible to write operating systems in a high 
level language only, without recourse to assembler. And in FreePascal, 
like all Delphi-dialects, the asm-Statement allows easy mixing of 
assembler and Pascal-code.