Close

Python assembler

A project log for One instruction VGA computer

Incorporates an improved minimal-chip One Instruction CPU with a hardware-driven VGA output

justin-davisJustin Davis 08/22/2022 at 18:330 Comments

I believe I've finished the VGA part of the design.  I've had to capture two pixels per address since it toggles back and forth between VGA and CPU.  So it only uses half the amount of memory now, but I dropped it to only 3-bit color.  I store the vsync and hsync in RAM to minimize logic as well.  I need to write a program to load the right sync values in the right locations in order to test the VGA.  For that, I need to do some coding for the CPU.

In order to do some coding, I really need a decent assembler.  I decided to take a page from the Gigatron and use Python as my assembler.  I looked around for a customizable assembler, but this assembly is a little different from most in that it doesn't have instructions to code - just addresses.  So I wrote my own.  It's probably my least-favorite part of the project.  I have it assembling into hex now, but I'd like to have it output into native VHDL so I can easily integrate it into my FPGA and run it.  At least I brushed up on my Python skills.

Discussions