Programming The RSS feed for Programming.

  • I simplified and extended my Python 65c02 assembler. It now checks the source code for valid opcodes and addressing modes. It still doesn’t check if any label value is valid. For labels to work, it has to established their values first (in a first pass of two passes). More to do… 👨‍💻

    A dark-themed code editor displays Python code on the left side with regular expression parsing, and a list of assembly instructions is shown on the right side.
  • I’m sure there are much easier ways to find the possible addressing modes of the 65c02 cpu. Even so, I spent many hours of code hacking today to get this result, with many failed attempts. Obviously, I’m not good at coding, nor problem solving. Practicing it must be a good thing. 👨‍💻

    A Python script involving regular expressions is displayed on the left, and the corresponding console output is shown on the right.
  • Okay, I can has implied, immediate, (indirect), (absolute indirect) addressing modes in this Python script I’m working on. It also makes a symbol table for code origin, labels and definitions (equates), used to calculate values and addresses. It’s a thing, 65c02 assembly on iPad. 👨‍💻

    A code editor displays Python code for an assembly language parser, and the console shows output results.
  • Instead of futzing around with Python, I decided to create a two-pass assembler, and wrote a version of the first pass, in which the label definitions are dealt with, both explicit and inline. I won’t create a professional grade assembler, just a hobby one. 👨‍💻

    A Python script is displayed on a code editor, featuring regular expressions, mnemonics, opcodes, and a section for label assignments.
  • Computer science is giving me headaches. Reflection and regular expressions. Argh! I could just as well hand-code machine code instead. 👨‍💻

  • Writing my own 65c02 assembler in Python on the iPad, because I can ♥︎ 👨‍💻

    A code editor displaying Python code for a 6502 assembler on the left and sample assembly code on the right.