nopa 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nopa-0.1.0/CHANGELOG.md +31 -0
- nopa-0.1.0/LICENSE.txt +21 -0
- nopa-0.1.0/MANIFEST.in +3 -0
- nopa-0.1.0/PKG-INFO +1423 -0
- nopa-0.1.0/README.md +1394 -0
- nopa-0.1.0/nopa/__init__.py +10 -0
- nopa-0.1.0/nopa/__main__.py +6 -0
- nopa-0.1.0/nopa/assemble.py +179 -0
- nopa-0.1.0/nopa/basic.py +158 -0
- nopa-0.1.0/nopa/context.py +338 -0
- nopa-0.1.0/nopa/cpu.py +452 -0
- nopa-0.1.0/nopa/directives.py +556 -0
- nopa-0.1.0/nopa/disassemble.py +210 -0
- nopa-0.1.0/nopa/evaluate.py +80 -0
- nopa-0.1.0/nopa/generators.py +38 -0
- nopa-0.1.0/nopa/imports/stack.py +55 -0
- nopa-0.1.0/nopa/imports/target/c128/basic.py +9 -0
- nopa-0.1.0/nopa/imports/target/c128/cia.py +35 -0
- nopa-0.1.0/nopa/imports/target/c128/ioport.py +4 -0
- nopa-0.1.0/nopa/imports/target/c128/kernal.py +43 -0
- nopa-0.1.0/nopa/imports/target/c128/machine.py +5 -0
- nopa-0.1.0/nopa/imports/target/c128/mmu.py +14 -0
- nopa-0.1.0/nopa/imports/target/c128/sid.py +34 -0
- nopa-0.1.0/nopa/imports/target/c128/vdc.py +4 -0
- nopa-0.1.0/nopa/imports/target/c128/vic.py +105 -0
- nopa-0.1.0/nopa/imports/target/c16/basic.py +9 -0
- nopa-0.1.0/nopa/imports/target/c16/kernal.py +43 -0
- nopa-0.1.0/nopa/imports/target/c16/machine.py +4 -0
- nopa-0.1.0/nopa/imports/target/c16/ted.py +55 -0
- nopa-0.1.0/nopa/imports/target/c64/basic.py +9 -0
- nopa-0.1.0/nopa/imports/target/c64/cia.py +35 -0
- nopa-0.1.0/nopa/imports/target/c64/ioport.py +4 -0
- nopa-0.1.0/nopa/imports/target/c64/kernal.py +43 -0
- nopa-0.1.0/nopa/imports/target/c64/keyboard.py +66 -0
- nopa-0.1.0/nopa/imports/target/c64/machine.py +3 -0
- nopa-0.1.0/nopa/imports/target/c64/music.py +149 -0
- nopa-0.1.0/nopa/imports/target/c64/sid.py +34 -0
- nopa-0.1.0/nopa/imports/target/c64/vic.py +103 -0
- nopa-0.1.0/nopa/imports/target/cx16/basic.py +12 -0
- nopa-0.1.0/nopa/imports/target/cx16/kernal.py +61 -0
- nopa-0.1.0/nopa/imports/target/cx16/machine.py +28 -0
- nopa-0.1.0/nopa/imports/target/cx16/vera.py +52 -0
- nopa-0.1.0/nopa/imports/target/cx16/via.py +35 -0
- nopa-0.1.0/nopa/imports/target/cx16/ym2151.py +33 -0
- nopa-0.1.0/nopa/imports/target/plus4/basic.py +9 -0
- nopa-0.1.0/nopa/imports/target/plus4/kernal.py +43 -0
- nopa-0.1.0/nopa/imports/target/plus4/machine.py +4 -0
- nopa-0.1.0/nopa/imports/target/plus4/ted.py +55 -0
- nopa-0.1.0/nopa/imports/target/vic20/basic.py +9 -0
- nopa-0.1.0/nopa/imports/target/vic20/kernal.py +40 -0
- nopa-0.1.0/nopa/imports/target/vic20/machine.py +9 -0
- nopa-0.1.0/nopa/imports/target/vic20/via.py +35 -0
- nopa-0.1.0/nopa/imports/target/vic20/vic.py +37 -0
- nopa-0.1.0/nopa/imports/utility.py +72 -0
- nopa-0.1.0/nopa/imports/vector.py +13 -0
- nopa-0.1.0/nopa/instructions.py +133 -0
- nopa-0.1.0/nopa/lexer.py +178 -0
- nopa-0.1.0/nopa/main.py +174 -0
- nopa-0.1.0/nopa/tests/__init__.py +1 -0
- nopa-0.1.0/nopa/tests/test_assemble.py +1493 -0
- nopa-0.1.0/nopa/tests/test_basic.py +108 -0
- nopa-0.1.0/nopa/tests/test_context.py +123 -0
- nopa-0.1.0/nopa/tests/test_cpu.py +223 -0
- nopa-0.1.0/nopa/tests/test_directives.py +932 -0
- nopa-0.1.0/nopa/tests/test_disassemble.py +259 -0
- nopa-0.1.0/nopa/tests/test_evaluate.py +83 -0
- nopa-0.1.0/nopa/tests/test_generators.py +119 -0
- nopa-0.1.0/nopa/tests/test_instructions.py +202 -0
- nopa-0.1.0/nopa/tests/test_lexer.py +180 -0
- nopa-0.1.0/nopa/tests/test_main.py +603 -0
- nopa-0.1.0/nopa/tests/test_text.py +65 -0
- nopa-0.1.0/nopa/text.py +92 -0
- nopa-0.1.0/nopa.egg-info/PKG-INFO +1423 -0
- nopa-0.1.0/nopa.egg-info/SOURCES.txt +78 -0
- nopa-0.1.0/nopa.egg-info/dependency_links.txt +1 -0
- nopa-0.1.0/nopa.egg-info/entry_points.txt +2 -0
- nopa-0.1.0/nopa.egg-info/not-zip-safe +1 -0
- nopa-0.1.0/nopa.egg-info/top_level.txt +1 -0
- nopa-0.1.0/pyproject.toml +48 -0
- nopa-0.1.0/setup.cfg +4 -0
nopa-0.1.0/CHANGELOG.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
What's new in Nop Assembler.
|
|
4
|
+
|
|
5
|
+
## [0.1.0] - 2026-11-20
|
|
6
|
+
|
|
7
|
+
The first release: a 6502 cross assembler for Commodore computers, where every expression is Python, and a disassembler.
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- multi-pass assembler for the 6502, with the stable illegal instructions, and for the 65C02, Rockwell R65C02 and WDC W65C02, chosen with `--cpu` or `.cpu`
|
|
11
|
+
- automatic zero page addressing
|
|
12
|
+
- Python expressions, f-strings and lambdas in operands and directives, directive arguments as in a Python call, unpacked with `*` or given by name, such as `.byte *table` or `.binary "music.sid", offset=$7e`, and blocks of Python code with `.python`
|
|
13
|
+
- generators: Python functions that return assembly code, with their own local labels for each call, and built-in ones such as `@ldax()` and `@pushRegisters()`
|
|
14
|
+
- local labels, which can also be used from anywhere by their full name, such as `start_loop`
|
|
15
|
+
- the current address as `_`, such as `jmp _`, which Python code can also read and assign
|
|
16
|
+
- constants, and zero page variables with `zp(size)`, e.g. `pointer = zp(2)`
|
|
17
|
+
- `.repeat` blocks, `.if` blocks with `.elif` and `.else`, `.for` loops over any Python iterable, as in Python, such as `.for i in range(8)` or `.for x, y in points`, conditions with `ref()` and `has()`, and `.optional` code that is only assembled when it is used
|
|
18
|
+
- named sections with `.section`, to store code and data in separate areas of memory
|
|
19
|
+
- data with `.byte`, `.word`, `.text`, `.string` and `.bits`, with text in PETSCII, screen codes or your own encoding
|
|
20
|
+
- tables with `.bytefill` and `.wordfill`, of zeros or the values of a function of the index: a lambda, such as `lambda x: x*3`, a built-in, or a function or method from Python code
|
|
21
|
+
- import of source and Python files, also into a namespace, such as `spr.draw` or `util.double()`, of binary files, and of SID music on the C64
|
|
22
|
+
- targets with `-t` for the C128, C16, C64, Plus/4 and VIC-20, and an experimental one for the Commander X16: hardware registers, KERNAL and BASIC routines, and BASIC lines with their keywords as tokens
|
|
23
|
+
- symbols defined on the command line with `-D`
|
|
24
|
+
- `.assert`, `.print`, `.warning` and `.error`, to check and report while assembling
|
|
25
|
+
- `.prg` or binary output, and a map of the memory used
|
|
26
|
+
- a labels file, as Python assignments, and VICE monitor commands with labels and `.break` breakpoints
|
|
27
|
+
- a disassembler, which turns a program into source that assembles to the same bytes, with the names from a labels file, and a monitor view of every instruction
|
|
28
|
+
- a Python API, `nopa.assembleFile` and `nopa.disassembleFile`, e.g. for unit tests of 6502 code
|
|
29
|
+
- requires Python 3.11 or later
|
|
30
|
+
|
|
31
|
+
[0.1.0]: https://github.com/Morty40/NopAssembler/releases/tag/v0.1.0
|
nopa-0.1.0/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright 2021-2026 Morten Perriard
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
nopa-0.1.0/MANIFEST.in
ADDED