Lazarus

Free Pascal => General => Topic started by: kveroneau on June 08, 2019, 11:52:46 pm

Title: Ever used a Cardiac Computer from Bell Labs?
Post by: kveroneau on June 08, 2019, 11:52:46 pm
I haven't, but I did write a Cardiac simulator this afternoon in Lazarus.  Best of all, the simulator is open source and available in my kDocs.  It might be useful to people who may want to learn how to build a computer simulator in Pascal, and for those who are otherwise interested in how a computer works.  You see, the Cardiac was used in the late 1960s to introduce Computer Science students to how a computer processor worked, it's simple enough to understand with only 10 distinct operational codes, and only 100 memory addresses.  If you are curious on the low-level workings of a computer processor, than this is definitely the project for you.  A computer science teacher at Drexel University in Philadelphia wrote a great article on the Cardiac from Bell Labs, which you can read up on here:  https://www.cs.drexel.edu/~bls96/museum/cardiac.html

A screenshot and full source, including the .lfm file can be found here:  http://tech406.com/kdocs/cardiac.xml

I will be publishing it into a source code repo shortly, and will also be building a Windows .EXE file for anyone who just wants to run it.  I'll update this post with a source code link once I have the code in a repo.

Source repo:  https://bitbucket.org/kveroneau/cardiac/src/

You know what really sucks about the Cardiac?  Having to write it's machine code by hand, so I created an Assembler for this beauty, in Object Pascal of course.  It is both in the BitBucket repo above, and can also be found within the kDocs.