Programming The RSS feed for Programming.

  • Writing a print file extension in Pythonista 3 seemed so easy… I had to learn a few new things, so, in the end, it’s all good. πŸ‘¨β€πŸ’»

    Python code for checking and printing contents of a text file, using the appex module.
  • Currently reading: Programming the 65816: Including the 6502, 65C02, and 65802 by David Eyes πŸ“š πŸ‘¨β€πŸ’»

  • I made a very basic and working 1-pass cross-assembler in Pythonista. It was more of a proof of concept, to help me understand the book I’m reading (Assemblers and Loaders) πŸ‘¨β€πŸ’»

    A code editor displays Python code on the left for an assembler, with an output console on the right showing hexadecimal values.

    PS Notice it’s still big-endian, while it should be little-endian. 😬

  • Currently reading: Assemblers and Loaders (Ellis Horwood Series in Computers & Their Applications) by David Salomon πŸ“š πŸ‘¨β€πŸ’»

  • I wondered about how to build (in Python) a linked list of tagged items, and how to print its tagged items. Each item has three containers: a link to the next same-tagged item (-1 if it’s the last item with that tag), a tag and a value. Here’s my solution. πŸ‘¨β€πŸ’»

    A Python script defines functions to manipulate lists based on tags with operations like adding, printing, and combining elements.
  • Learning about iOS’s sandbox limitations. Pythonista has full access to its own private folders (on device and/or iCloud). You can edit external files, even run Python scripts, but iOS gives scripts no access to files outside mentioned private folders, unless files are shared to it. πŸ‘¨β€πŸ’»

  • I guess I need superior knowledge, not reinvent the wheel. For creating a proper assembler, I need to know how others build those, and better non-fiction writing is a good thing too, since I’ll be communicating to others (including my future self) via code and comments. πŸ‘¨β€πŸ’»

    A table of contents from a book displays sections on assemblers and loaders, including topics like assembler operation, relocating object files, and historical notes.
  • I find it empowering that one can build somehing useful inside a computer. What I do, I don’t think qualifies as programming, but is more like scripting, using macros, which is useful in its own way, though not as generic as an app on a phone or on the web. Doesn’t need to be. πŸ‘¨β€πŸ’»

    A coding interface displays a script for processing syntax breakdowns with condition checks and dictionary updates.
  • Continuing my 65c02 assembler project in Python 3, with defining “the rules.” Without rules, there’s unruliness, right? πŸ˜‰ The script still runs. If it wouldn’t have, I could’ve rolled back using the Working Copy app. PS, notice the typo! πŸ‘¨β€πŸ’»

    A screenshot displays a Python code editing interface with a code snippet detailing updates and comments related to a project file named 65c02 assembler v-0.1.py.
  • Now I’m (seemingly) successfully able to filter syntax elements into their own tagged bins, now the question arises how to turn that into object code (byte values)? So I still call it version 0.0.1, very premature, possibly, yet again, stillborn. I hope not the latter, though. πŸ‘¨β€πŸ’»

    A computer screen displays code on the left side related to 65c02 assembly language and a console output on the right side listing various system commands or compiler operations.
  • I have no idea what the best method is to approach an assembler, specifically for the 65c02 CPU. So I scrapped my previous approach and started anew. I also bought the newest version of Pythonista, because the old version crashed too often (new version seems rock-solid). πŸ‘¨β€πŸ’»

    A computer screen displays coding text on the left and a console with output on the right.
  • So, version 0.1 of my Python 🐍 65c02 assembler is βœ… I’m sure there are still bugs, but it works. I enter in assembly code and the program stores it in a dictionary object, which could be saved into a file on disk. Not sure when I come to that. First priority is testing the code. πŸ‘¨β€πŸ’»

    A text editor displaying Python code for parsing assembly instruction mnemonics with open comments and a command terminal executing the script.
  • πŸ˜ƒI’m getting closer with my 65c02 assembler in Python. I ripped out the mnemonics processing, which worked perfectly, but was messy code, and got the other stuff to work, like labels, addressing input, program counter manipulation, etc. I also started using the Working Copy app. πŸ‘¨β€πŸ’»

    A programmer's workspace is displayed, featuring code editing and debugging tools with Python code for instruction parsing and a console output detailing steps and results.
  • Okay, it’s still very clunky, but I can (sorta) write in assembler, type the hexcode in HexIt and save the file to my local Commander X16 folder, and it runs! I couldn’t do this before, unless I coded the hexcode by hand, which was rather error-prone. So, yay? 😁 πŸ‘¨β€πŸ’»

    A blue screen displays retro computer programming code and hexadecimal data for debugging.
  • While awaiting the glaziers for replacing some windows, I’ve made progress with my 65c02 Python assembler project. It now creates a list of strings, each with a program counter, a colon, and a series of opcode and operand bytes, all in hex characters and in the proper order πŸ˜ƒ πŸ‘¨β€πŸ’»

    A code editor displays Python code related to instruction parsing, with comments and string definitions, alongside an output console showing assembly instructions.
  • I had some great progress on my Python 65c02 assembler project. I have all opcodes tested and can check if an instruction is valid. For instance, lda 30,y is not a valid instruction, while lda 30,x is valid. Now it’s up to me to test some instructions. πŸ‘¨β€πŸ’»

    A code editor is open on a device screen, displaying a table of instruction bytes on the left, and a Python script with a console output on the right.A code editor displays Python code on the left side for an instruction parser and a list of assembly-like instructions on the right side.

  • Getting closer, inch-by-inch, to processing 65c02 instructions in Python… πŸ‘¨β€πŸ’»

    A code editor displays a Python script related to instruction parsing, alongside notes and regex patterns for opcode handling.
  • I discovered a superpower, yield in Python 😲 awesome! πŸ‘¨β€πŸ’»

    A code editor is open with Python code on the left and output results on the right, displaying formatted strings.
  • In other news, Textastic, a great code editor on iOS, stopped working when I updated my iPad to 14.5.1 from pre-14.5. It had worked for 5 years after the last update, and it was great. So I did a paid upgrade of Textastic to the latest version. There’s code hacking ahead! πŸ‘¨β€πŸ’»

  • 🀩 this website made me reconsider how to construct my 65c02 cross assembler. I guess I need to whip up a spec sheet before I start coding in Python. All the work is not for naught, since I learned some regular expressions. πŸ‘¨β€πŸ’»