diff options
| author | Jan Tuomi <jans.tuomi@gmail.com> | 2023-11-20 22:14:55 +0200 |
|---|---|---|
| committer | Jan Tuomi <jans.tuomi@gmail.com> | 2023-11-20 22:14:55 +0200 |
| commit | e2fd1c7ee759ac8870f21afe5fc4e36c8b808d25 (patch) | |
| tree | d9041314fa29d4acfc72440be9192207ba08c964 /asm/test_py_src.py | |
| parent | 14d8401c721fae8367fa24db20af4e344faafdd4 (diff) | |
Do things
Diffstat (limited to 'asm/test_py_src.py')
| -rw-r--r-- | asm/test_py_src.py | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/asm/test_py_src.py b/asm/test_py_src.py index ec17ddc..676f8cd 100644 --- a/asm/test_py_src.py +++ b/asm/test_py_src.py @@ -1,21 +1,34 @@ -import atk16 +# TODO: actual imports, not just `import atk16` +from atk16 import * -TEXT_MODE: atk16.ConstInt = 1 -GRAPHICS_MODE_ADDR_P: atk16.ConstInt = 0x17 -TEXT_MEM_ADDR_P: atk16.ConstInt = 0x19 +GRAPHICS_NO_MODE: ConstWord16 = 0 +GRAPHICS_TEXT_MODE: ConstWord16 = 1 +GRAPHICS_SPRITE_MODE: ConstWord16 = 2 -graphics_mode_addr = atk16.load(GRAPHICS_MODE_ADDR_P) -text_mem_addr = atk16.load(TEXT_MEM_ADDR_P) +GRAPHICS_MODE_PP: ConstWord16 = 0x17 +TEXT_MEM_PP: ConstWord16 = 0x19 -atk16.store(graphics_mode_addr, TEXT_MODE) +# asm( +# "@label keyboard_isr" +# " spu RA" + +# " spo RA" +# ) + +# set_isr(0, "keyboard_isr") + +graphics_mode_p = load(GRAPHICS_MODE_PP) +text_mem_p = load(TEXT_MEM_PP) + +store(graphics_mode_p, GRAPHICS_TEXT_MODE) def nth_letter(n: int) -> int: - return atk16.ord('A') + n + return ord('A') + n i = 0 while i < 26: - atk16.store(text_mem_addr + i, nth_letter(i)) - i = i + 1 + store(text_mem_p + i, nth_letter(i)) + i += 1 while True: pass |
