I have noticed that the interpreter system you have implemented is stack based, have you ever thought about creating a new backend to generate MSIL code (to work in .NET)?
I ask this, because if your p-code is stack-based, porting to generate MSIL code should not be too complicated, because the MSIL code is also stack-based
Sorry for the late answer, I did not get a notification...
Indeed it is purely stack based. I have to say modestly that I did not implement anything myself: HAC is a translation of SmallAda (written in Pascal) which is an adaptation of Copascal which is an extension of Pascal-S written by Pr. Wirth himself. So I am discovering slowly how it works, but clearly another target than p-code would be nice. As I see it an abstracted code emitter could emit, beside p-code, MSIL (not my priority) but "real" machine code.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have noticed that the interpreter system you have implemented is stack based, have you ever thought about creating a new backend to generate MSIL code (to work in .NET)?
I ask this, because if your p-code is stack-based, porting to generate MSIL code should not be too complicated, because the MSIL code is also stack-based
https://www.codeproject.com/Articles/1151739/DotNetPeLib-A-library-to-read-and-generate-Net-ass
Sorry for the late answer, I did not get a notification...
Indeed it is purely stack based. I have to say modestly that I did not implement anything myself: HAC is a translation of SmallAda (written in Pascal) which is an adaptation of Copascal which is an extension of Pascal-S written by Pr. Wirth himself. So I am discovering slowly how it works, but clearly another target than p-code would be nice. As I see it an abstracted code emitter could emit, beside p-code, MSIL (not my priority) but "real" machine code.