Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Paolo Amoroso
Paolo Amoroso
@amoroso@oldbytes.space  ·  activity timestamp last month

Between 1988 and 1995 Jack Crenshaw posted on Usenet "Let's Build a Compiler", a tutorial series on writing a Pascal compiler that generates 68K Assembly. 35 years later Eli Bendersky revisited the series and rewrote the compiler in Python to generate WebAssembly.

https://eli.thegreenplace.net/2025/revisiting-lets-build-a-compiler

#compilers #pascal #python #wasm #m68k

  • Copy link
  • Flag this post
  • Block
Mat
Mat
@allpurposemat@mastodon.gamedev.place replied  ·  activity timestamp last month

@amoroso That series got me all the way from ideating a toy CPU with a friend to actually making a language we could use for it, it felt so rewarding. Very nice, gentle introduction to the topic :)

  • Copy link
  • Flag this comment
  • Block
Paolo Amoroso
Paolo Amoroso
@amoroso@oldbytes.space replied  ·  activity timestamp last month

@allpurposemat What system did it run on? MS-DOS?

  • Copy link
  • Flag this comment
  • Block
Mat
Mat
@allpurposemat@mastodon.gamedev.place replied  ·  activity timestamp last month

@amoroso I wrote it in Java, so it could run on, well, probably any of those 3 Billion Devices that supposedly run Java. 😅

The compiler would turn a very basic lang into assembler, which then was immediately run through another "compiler" that actually output the bytecode. Then we'd run it on an emulator I (very poorly) wrote for the CPU. It was a very nice alternative to hex editing programs with the opcode table on the side, which was the what we were doing before!

  • Copy link
  • Flag this comment
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.1-beta.35 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Members
  • Code of Conduct