From e2fd1c7ee759ac8870f21afe5fc4e36c8b808d25 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Mon, 20 Nov 2023 22:14:55 +0200 Subject: Do things --- asm/test_py_src.atk16 | 92 +++++++++++++++++++++++++-------------------------- 1 file changed, 46 insertions(+), 46 deletions(-) (limited to 'asm/test_py_src.atk16') diff --git a/asm/test_py_src.atk16 b/asm/test_py_src.atk16 index b605dad..c38d1ca 100644 --- a/asm/test_py_src.atk16 +++ b/asm/test_py_src.atk16 @@ -85,21 +85,21 @@ @label int_6 26 -; +; @label nth_letter ; stack frame with offsets ; n 0 -; -; -; BinOp lhs -; -; Builtin call ord [] -; +; +; +; BinOp lhs +; +; Builtin call ord [] +; ldi int_0 RC ldr RC RC ; int_0 = 65 spu RC -; BinOp rhs -; (n) +; BinOp rhs +; (n) ldi 0 RC add FP RC RC ldr RC RC @@ -120,12 +120,12 @@ ; text_mem_addr 1 ; i 2 addi SP 3 SP -; +; ; assigning graphics_mode_addr at FP + 0 ; evaluating value to be assigned -; -; Builtin call load [] -; (GRAPHICS_MODE_ADDR_P) +; +; Builtin call load [] +; (GRAPHICS_MODE_ADDR_P) ldi graphics_mode_addr_p RC ldr RC RC spu RC @@ -138,12 +138,12 @@ ldi 0 RB add RB FP RB str RA RB -; +; ; assigning text_mem_addr at FP + 1 ; evaluating value to be assigned -; -; Builtin call load [] -; (TEXT_MEM_ADDR_P) +; +; Builtin call load [] +; (TEXT_MEM_ADDR_P) ldi text_mem_addr_p RC ldr RC RC spu RC @@ -156,14 +156,14 @@ ldi 1 RB add RB FP RB str RA RB -; -; Builtin call store [, ] -; (graphics_mode_addr) +; +; Builtin call store [, ] +; (graphics_mode_addr) ldi 0 RA add FP RA RA ldr RA RA spu RA -; (TEXT_MODE) +; (TEXT_MODE) ldi text_mode RA ldr RA RA spu RA @@ -174,10 +174,10 @@ spu RA ; popping free-standing Expr result from stack spo RA -; +; ; assigning i at FP + 2 ; evaluating value to be assigned -; +; ldi 0 RC spu RC ; assigning stack address (FP + 2) := top of stack @@ -185,19 +185,19 @@ ldi 2 RB add RB FP RB str RA RB -; +; @label while_test_1 -; -; (i) +; +; (i) ldi 2 RB add FP RB RB ldr RB RB spu RB -; +; ldi int_6 RB ldr RB RB ; int_6 = 26 spu RB -; Comparing +; Comparing spo RC spo RB sub RB RC RB @@ -212,17 +212,17 @@ spo RA addi RA 0 RA bri zero While_else_2 -; -; Builtin call store [, ] -; -; BinOp lhs -; (text_mem_addr) +; +; Builtin call store [, ] +; +; BinOp lhs +; (text_mem_addr) ldi 1 RA add FP RA RA ldr RA RA spu RA -; BinOp rhs -; (i) +; BinOp rhs +; (i) ldi 2 RA add FP RA RA ldr RA RA @@ -231,12 +231,12 @@ spo RA add RA RB RA spu RA -; +; ; Call function nth_letter spu FP ldi 0 RA spu RA -; (i) +; (i) ldi 2 RA add FP RA RA ldr RA RA @@ -259,18 +259,18 @@ spu RA ; popping free-standing Expr result from stack spo RA -; +; ; assigning i at FP + 2 ; evaluating value to be assigned -; -; BinOp lhs -; (i) +; +; BinOp lhs +; (i) ldi 2 RC add FP RC RC ldr RC RC spu RC -; BinOp rhs -; +; BinOp rhs +; ldi 1 RC spu RC spo RD @@ -285,15 +285,15 @@ jpi While_test_1 @label while_else_2 @label while_end_3 -; +; @label while_test_7 -; +; ldi 1 RB spu RB spo RA addi RA 0 RA bri zero While_else_8 -; +; jpi While_test_7 @label while_else_8 @label while_end_9 -- cgit v1.3