diff options
| author | Jan Tuomi <jans.tuomi@gmail.com> | 2023-11-11 23:13:43 +0200 |
|---|---|---|
| committer | Jan Tuomi <jans.tuomi@gmail.com> | 2023-11-12 00:40:00 +0200 |
| commit | 6f68c0febdbfd6138fa95f77bc09785bde8a8371 (patch) | |
| tree | 8f622e64ddbfa132e9fa991bb3e5961b72f826bb /asm/test_py_src.py | |
| parent | f7dd9705d44b9cee5103b267797c0449d42319df (diff) | |
Add function defs & calls
Diffstat (limited to 'asm/test_py_src.py')
| -rw-r--r-- | asm/test_py_src.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/asm/test_py_src.py b/asm/test_py_src.py index 9af944e..ca816de 100644 --- a/asm/test_py_src.py +++ b/asm/test_py_src.py @@ -1,11 +1,31 @@ import atk16 +TEXT_MODE: atk16.ConstInt = 1 +GRAPHICS_MODE_ADDR_P: atk16.ConstInt = 0x17 +graphics_mode_addr = atk16.load(GRAPHICS_MODE_ADDR_P) + +TEXT_MEM_ADDR_P: atk16.ConstInt = 0x19 +text_mem_addr = atk16.load(TEXT_MEM_ADDR_P) + +atk16.store(graphics_mode_addr, TEXT_MODE) + def func(arg1: int, arg2: int) -> int: a = arg1 return a + a b = func(1, 3) +i = 0 +atk16.store(text_mem_addr + i, atk16.ord("h")) +i = i + 1 +atk16.store(text_mem_addr + i, atk16.ord("i")) + +while True: + pass + +# atk16.asm("@label keepalive") +# atk16.asm(" jpi keepalive") + # TEXT_MODE: atk16.ConstInt = 1 # GRAPHICS_MODE_ADDR: atk16.ConstInt = 0x17 |
