On May 11, 2025, at 03:28, Jackson Helie G wrote:
I am curious about what the intermediate code
generated by bc is?
Hi,
I don’t have a direct answer, but I can refer you to Angelo Papenhoff’s work in
reconstructing B, which is probably the most extensive and faithful to the
original. He’s written B compilers[0] in C for bootstrapping purposes, another
in B, and reconstructed one in B which works on Unix V1. The intermediate code I
think you’re referring to is the threaded code, which Angelo covers on his
site[1], from having reverse engineered libb and bilib. There was some
discussion on this list about it some years ago[2]. His work is probably the
best resource.
[0]:
https://github.com/aap/b
[1]:
http://squoze.net/B/
[2]:
https://www.tuhs.org/pipermail/tuhs/2019-April/017750.html
Thalia