From cf36b4c33cb157f1bac7b3abe0dcfd5cc12bf924 Mon Sep 17 00:00:00 2001 From: Tobias Girstmair Date: Fri, 21 Dec 2018 20:33:10 +0100 Subject: [PATCH] conserve 6 bytes of progmem replace NOPs in intr.vector with useful instructions --- foo.S | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/foo.S b/foo.S index 6ea9716..e426ebf 100644 --- a/foo.S +++ b/foo.S @@ -40,6 +40,9 @@ FLASHM = 0x4000 .section .text .org 0x0000 ; RESET interrupt + CLR i0 + CLR i1 + CLR i2 RJMP main .org 0x0008 ; TIM0_OVF interrupt RJMP sample @@ -240,9 +243,7 @@ g: ; g(i, t) -> t RET ; TODO: replace CALL/RET with IJMP? main: ; setup routine - CLR i0 - CLR i1 - CLR i2 + ; NOTE: clr i0..i2 moved to .ord 0x0 CLR i3 CLR acc ; we output a dummy sample before the actual first one LDI Xhi, hi8(FLASHM + notes) ; never changes -- 2.39.3