Paolo Amoroso's Journal

Python

What I anticipated and planned for is happening.

After the great momentum of the initial work on Suite8080, I set it aside for a couple of months. Now I'm about to resume work on the project and wonder how hard it'll be to dive back into the Python code and continue development.

I tried to prepare for this by documenting the system and commenting the code. I also took many notes on to-do items, features I'd like to add, and ways to implement them. At a few thousand lines, the code base is small and I hope it won't be too difficult to understand and change.

Still, I'm a Python beginner and my code is tightly coupled, fragile, not modular, and hard to extend.

Suite8080 is a suite of Intel 8080 Assembly cross-development tools I'm writing in Python.

#Python #Suite8080

Discuss... Email | Reply @amoroso@fosstodon.org

I released version 0.5.0 of Suite8080, a suite of Intel 8080 Assembly cross-development tools I'm writing in Python. Although still in an early stage, this version makes Suite8080 gain enough functionality to be useful in a variety of Assembly applications.

In my next steps I'm going to focus on two areas of improvement.

First, I'll write more 8080 programs to process with the Suite8080 assembler and run on emulated CP/M systems or actual hardware. After all, this is the fun part I began the project for.

The Suite8080 Python sources are still a tangled mess of tightly-coupled, unencapsulated, beginner code with global state that makes it difficult to add new features or change existing ones. Therefore, the other area of improvement I'll work on is a major redesign. This should make the code easier to work with and extend.

#Python #Suite8080

Discuss... Email | Reply @amoroso@fosstodon.org

I extended the Suite8080 assembler to allow the ds directive to take a label as an operand. The label, which must be defined before use, may be in uppercase. I also broke into subsections the section of the documentation about the assembler limitations, as well as mentioning the limitations of org and ds.

This hopefully concludes the work to make the assembler accept uppercase identifiers such as instruction mnemonics, labels, and constants.

Suite8080 is a suite of Intel 8080 Assembly cross-development tools I'm writing in Python.

#Suite8080 #Python

Discuss... Email | Reply @amoroso@fosstodon.org

Once I fixed the Suite8080 assembler to let db accept uppercase symbols, I was ready to work on a similar fix for dw.

But I got dw uppercase support for free as a side effect of canonicalizing symbols to lowercase when adding 16-bit words to the symbol table, as dw already converted symbols to lowercase before checking for inclusion in the table. This unlocked uppercase symbol support, again for free, for most other 8080 instructions that take an address operand such as lhld, shld, lda, sta, jmp, and more.

#Suite8080 #Python

Discuss... Email | Reply @amoroso@fosstodon.org

I resumed working on Suite8080 and fixed the assembler's db directive to accept uppercase symbols as in this example:

SYM		equ	1
label:  	db	SYM

I changed the code that adds symbols to the symbol table to canonicalize to lowercase, and the db processing code to convert symbols to lowercase before checking if they're in the table.

Suite8080 is a suite of Intel 8080 Assembly cross-development tools I'm writing in Python.

#Suite8080 #Python

Discuss... Email | Reply @amoroso@fosstodon.org