Programming
-
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. π¨βπ»
-
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. π¨βπ»
-
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! π¨βπ»
-
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. π¨βπ»
-
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). π¨βπ»
-
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. π¨βπ»
-
π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. π¨βπ»
-
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? π π¨βπ»
-
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 π π¨βπ»
-
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, whilelda 30,x
is valid. Now it’s up to me to test some instructions. π¨βπ» -
Getting closer, inch-by-inch, to processing 65c02 instructions in Pythonβ¦ π¨βπ»
-
I discovered a superpower, yield in Python π² awesome! π¨βπ»
-
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. π¨βπ»
-
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β¦ π¨βπ»
-
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. π¨βπ»
-
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. π¨βπ»
-
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. π¨βπ»
-
Computer science is giving me headaches. Reflection and regular expressions. Argh! I could just as well hand-code machine code instead. π¨βπ»