Ada 83 TLALOC compiler produces direct UEFI bootable executable BOOTX64.EFI

Hi.all !

Something interesting :

as I have now the Ada 83/TLALOC path to Windows PE32+ with codi_x86_64W.finc I told me "what if I produce a BOOTX84.EFI with an appropriate codi_x86_64U.finc ? ". Just have to replace kernel32 services with UEFI ones.

I dit it yesterday (all predefined units adapted through LLIR SYS services) and tested it under qemu, it works :

SYSTEM> qemu-system-x86_64 -bios /usr/share/ovmf/OVMF.fd -drive format=raw,file=fat:rw:esp -nographic

Outputs :slight_smile:

BdsDxe: loading Boot0001 "UEFI QEMU HARDDISK QM00001 " from PciRoot(0x0)/Pci(0x1,0x1)/Ata(Primary,Master,0x0)
BdsDxe: starting Boot0001 "UEFI QEMU HARDDISK QM00001 " from PciRoot(0x0)/Pci(0x1,0x1)/Ata(Primary,Master,0x0)
TLALOC/UEFI
=== 1. DIRECT_IO sur type enumere COULEUR ===
  COULEUR'SIZE =           8 bits (info)
=== 2. DIRECT_IO sur record POINT ===
  POINT'SIZE =          96 bits (info)
=== 3. DIRECT_IO sur tableau VECTEUR ===
  VECTEUR'SIZE =         128 bits (info)
=== 4. SET_INDEX, INDEX et END_OF_FILE (sur POINT) ===
=== 5. RESET et reecriture partielle INOUT (sur POINT) ===
=== 6. Boucle while not END_OF_FILE (sur VECTEUR) ===
=== 7. WRITE positionne au-dela de la fin (extension) ===
=== 8. Exceptions ===
=== 9. DELETE ===

RESULTAT :  65 OK,   0 ECHECS
DIRECT_IO_TEST PASSE
SYS_EXIT

So to my knowledge Ada 83/TLALOC is the only documented Ada 83 compiler able to produce a direct UEFI executable program (no boot loader involved, no assembly, no C, only pure Ada 83 :relieved_face: the Nirvana…).

Perhaps someone already dit it ?

Many interesting things can be done with this “bare metal” (well… UEFI supported) version.

3 Likes

That is very cool.

P.S. Long ago I worked with transputers (Inmos T805). I dreamed to be able to compile Ada and load the programs into the nodes directly. Then we compiled C natively. I suppose you could run TALOC in the UEFI… :grinning_face:

Hi Dmitry !

Yes that is my intention, I just need a minimal command loop to replace the bash shell, or better the sort of APSE I had in view. But the current version of my APSE embryo uses tasks, so that only gnat can compile/execute it. I’ll try with a VMS/DCL like command loop.

??
Aren’t both of these essentially handled by a DIANA execution module? (Use TASK and allow the tasking to be handled by the runtime; using single-CPU vs multi-core vs multi-CPU then becomes linking with the appropriate runtime.)