6
$\begingroup$

We are considering integrating our processors design and architecture course with our assembly programming course by using the same processor for both. The processor class (which does its work in Logisim) does not have to necessarily implement the entire processor used by the assembly class. A usable subset would be fine.

The assembly class focuses on stack operations, function calls, and PC operations, so any assembly language that we move to would have to support these as well.

Currently, our assembly class uses 6502, which has 6 registers (including flags), and a very limited number of commands. This might end up being our best choice for integrating into processors, as I have not found anything simpler yet.

As far as the processor design class is concerned, 8-bit machines are about twice as good as 16-bit machines, and about 4x as good as 32-bit machines, and I'd like to keep the number of registers down to a manageable number. 6502's 6 registers is pretty reasonable.

The only assembly language for beginners that I have found is ACSL assembly, but it lacks a memory bus entirely (so no stack). Are there other languages that I am overlooking?

$\endgroup$
  • $\begingroup$ would the language choice tag fit here? $\endgroup$ – ItamarG3 Jun 5 '17 at 18:27
  • 1
    $\begingroup$ Good point, added. $\endgroup$ – Ben I. Jun 5 '17 at 19:19
  • $\begingroup$ Just curious, is this all for HS students? I'm quite impressed. $\endgroup$ – xuq01 Jun 5 '17 at 19:43
  • $\begingroup$ What would be wrong with using this RISC version of LMC peterhigginson.co.uk/RISC - or at least a subset thereof? What's the processor course implementation target? $\endgroup$ – Sean Houlihane Jun 5 '17 at 20:06
  • 1
    $\begingroup$ @xuq01 Yes, all for HS. We have an unusually advanced program for the states, with 4-year CS majors in HS. $\endgroup$ – Ben I. Jun 5 '17 at 20:13
4
$\begingroup$

Go with the 6502. Its market penetration and popularity has generated a lot of resources over the years, giving you more to work with. Looking into the "home-brew CPU" realm should supply significant material to make reproducing the 6502 in Ligisim fairly easy. It already has a small instruction set (around 150 operations) that includes stack operations. There are also several assemblers available that will allow you to cross-assemble the code on a PC and load it into the 6502.

As a bonus for the students, because of its popularity, there should be a few programs in the wild that you can get for the architecture students to run after they build the processor. Of course, that means they'd have to implement the whole processor, but it also gives them the boost of making the processor that will run a "real" program off the Internet.

As a bonus for you, since you've already been using it for the assembly class, you already have the materials, lessons, and experience for the assembly class and can concentrate on building lessons for the design class.

$\endgroup$
4
$\begingroup$

Have you considered using a microcontroller assembly?

My first CPU design and assembly course, which also combined both courses, was based on the PIC microcontroller. We studied the 8-bit variant, which has a relatively simple architecture.

It has slightly more registers than the 6502; you can say 8 registers with the 16-bit registers like PC spilt into two 8-bit registers. However, it also has embedded RAM and ROM so you can teach them about memory access if you find that useful. It also has fewer instructions (33). In addition, it is still used a lot in the real world, so they can possibly buy a cheap development kit and play around with it.

Here's a guide to the PIC assembler: http://ww1.microchip.com/downloads/en/DeviceDoc/33014K.pdf

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.