Hershel 64-bit compiler

Component Pascal native x64 compiler http://herschel.oberon.org/
User avatar
Ivan Denisov
Posts: 363
Joined: Tue Sep 17, 2013 12:21 am
Location: Krasnoyarsk, Russia

Re: Hershel 64-bit compiler

Post by Ivan Denisov »

http://herschel.oberon.org/2021/01/28/post/
Allrighdee, there’s alot of news since the last update.

* ELF (Linux) and PE (Windows) executables are produced from 1 module, allowing host system binding (calls to host os). This enables ‘Hello world’ applications on both host platforms. Exciting stuff!

* This implies the two host calling conventions (SysV and MS x64) have been implemented as well. This is a huge amount of work!

* Both sides of the calling conventions have been implemented - this means that you can call a procedure of the convention AND write your own procedures of those conventions. This is necessary for host callback procedures in BlackBox - and for clients that want to make, say, DLLs in BlackBox with procedures that can be called by C/C++/arbitrary programs.

* PE DLLs can be made of 1 module. Lots of work here!

* IF, WHILE, REPEAT, RETURN, FOR implemented. This was maybe one of the simplest parts of the work done.

* REAL and SHORTREAL arythmetic added. It uses the inherited x87 implementation. Limited use of XMM unit is implemented to allow interaction with MS x64 calling convention.

As a side-effect:

* Improved OCF decoder and disassembler, using some advice from user X512.

* A module providing convenient scanners for the OCF format is under construction. May be of use in other system-level programs.
X512
Posts: 72
Joined: Sat Feb 07, 2015 2:51 pm

Re: Hershel 64-bit compiler

Post by X512 »

April 2021 Update
  • Most language features save type extension and pointers handling implemented.
  • A downloadable package for Windows, here, easy to run and try out Herschel features.
  • The binder tool now capable of producing a DLL out of an OCF module (that is, one compiled Component Pascal module)
  • Compiler capable of adhering to Microsoft calling convention (mark your procedures with [ms64] sysflag)
  • Produced DLL (with some language features) tested successfully in Excel VBA environment
For further compiler development, an improved testing environment is necessary (at least desireable) that could link a tested module with a proto-kernel - a trivial run-time environment that provides the NEW procedure implementation. After some consideration, we have decided to continue building on the A2 testing environment. Now, a trivial linking module loader has been implemented that runs in A2/Linux64. With this, we will be working on type extension, dynamic variables and pointer handling.

As side effects:
  • Further improvements in the OCF decoder, making decoded OCF modules easier to understand and proof-read.
  • Feeling VERY uncomfortable with the A2 user experience, built a simple tool that enables A2 source editing in BlackBox (including use of all text attributes), compilation in A2’s Fox compiler, with error messages brought back into convenient BlackBox error markers.
Source: https://herschel.oberon.org/2021/04/10/post/

Download: https://github.com/adimetrius/Herschel/releases/tag/gu
Last edited by X512 on Tue Apr 13, 2021 2:11 pm, edited 1 time in total.
X512
Posts: 72
Joined: Sat Feb 07, 2015 2:51 pm

Re: Hershel 64-bit compiler

Post by X512 »

This update introduced native module import support, currently only procedures can be imported, global variables and type import are not yet implemented.

I did some testing and reported new issues at https://github.com/adimetrius/Herschel/issues.
Post Reply