From 0383f48606c233ca14e9ce73e8c4948dd96d579b Mon Sep 17 00:00:00 2001 From: Daniel Serpell Date: Mon, 19 Oct 2026 16:31:52 -0300 Subject: [PATCH] interp: Remove page assumption in SIN/COS constants Load the high byte of fp_90 explicitly in degree mode instead of asserting that fp_pi1_2 and fp_90 are in the same page. The assert failed when unrelated runtime tokens changed the code layout. Fixes #52 Aided by Opencode / DeepSeek V4.1 Flash 1017 --- src/interp/atarifp/fp_sincos.asm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/interp/atarifp/fp_sincos.asm b/src/interp/atarifp/fp_sincos.asm index 3f3a262..9065d9c 100644 --- a/src/interp/atarifp/fp_sincos.asm +++ b/src/interp/atarifp/fp_sincos.asm @@ -78,8 +78,7 @@ FPNORM=$DC00 lda DEGFLAG beq do_rad ldx #fp_pi1_2) = (>fp_90), error, "PI/2 and 90 fp constants in different pages" + ldy #>fp_90 do_rad: jsr FLD1R