Skip to main content Skip to local navigation
Home » Category: 'assembler'

assembler

Working with the CoreWars 8086 source code

As I wrote before I think that the CoreWars 8086 program is pretty neat and I also think that it has the potential as a valuable teaching tool in my courses. By reimagining RedCode as real assembly for the 8086 processor, the developers take the CoreWar concept and make it more real -- more legitimate. […]

CoreWars for 8086

The Core War concept has been around since the 1980s. It uses a made-up version of Assembler called RedCode and the potential for using it to teach Assembler programming and computer architecture is really good. The other day I came across a variant of the RedCode-based games called CoreWars 8086. The GitHub page hosts six […]

A Binary File Editor for My Students

As I ponder fun activities to do with my 2nd year computer architecture students it has become clear to me that I need them to be able to view binary files. There are a number of editors out there capable of doing this, but I don't want to foist vim or emacs on them. Nor […]

Writing a Simple Project for Espressif IDF Command Line Compiler Tools

Today we're going to write a program that can compile, from the command line, with the Espressif IDF tools. (India-Delta-Foxtrot, not India-Delta-Echo) It's assumed that you have installed those tools already. If not, review the instructions online or in class. You can follow along here in this blog post but also in a YouTube video […]

Exploring RISC-V: Espressif IDE on macOS & ESP32-C3

While we expect our students to use the Espressif IDE software in the Lassonde labs, on computers provided by the School, they should also feel enabled to install the software on their own machines. The following is a description of what I did to get it to work on my macOS machine. Note that once […]

Exploring RISC-V: Espressif IDE & ESP32-C3

Here is a short post on a successful attempt to write a C program in the Espressif IDE on the EECS Linux computers (LAS 1006). I have an ESP32-C3 development board plugged in and have the IDE loaded with the boilerplate code inserted when I choose a simple example from the menu. I then modified […]

Exploring RISC-V Options: the RP2350 (Part 8 -- Returning a Single Array Value)

Here, we'll return the value from an array defined in the assembler file to the calling C function. When writing programs like this it's handy to refer to a "cheat sheet" like this one. If everything works as it should your serial monitor should have the following output: There are two files here: returnArrayValue.S and […]

Exploring RISC-V Options: the RP2350 (Part 7 -- C+ASM returning values)

Here I want to post an example of an assembler function that simple sends a value back to the C function that called it. The concept and approach are pretty general, but it is specifically aimed, via the assembler code for running on the RP2350 RISC-V system. Small changes would be needed for a PIC18, […]

Exploring RISC-V Options: the RP2350 (Part 6 -- Assembler Errors)

Writing assembler code is hard, for a few reasons. First, the lack of abstraction forces you to think about each and every step of your program. Second, the lack of abstraction requires you to know a great deal about the hardware. Then, the grammar is just weird. You might write it from left to right […]

Exploring RISC-V Options: the RP2350 (Part 4 -- Serial Monitor Tooling)

It's easy to get caught in weird assembler errors. This is made more difficult if you don't have a background debugger and need to use a boot loader / serial monitor to debug your system. Sometimes that's all you have. So here is a suggestion for a C++ and Assembler file pair to check to […]