From 12026ee98a03900ee16d5887fba2d5e44fc12750 Mon Sep 17 00:00:00 2001 From: cuz Date: Tue, 31 Oct 2000 18:53:38 +0000 Subject: [PATCH] Optimization git-svn-id: svn://svn.cc65.org/cc65/trunk@422 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/runtime/ldeax.s | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/libsrc/runtime/ldeax.s b/libsrc/runtime/ldeax.s index 9912a5211..2213e9af4 100644 --- a/libsrc/runtime/ldeax.s +++ b/libsrc/runtime/ldeax.s @@ -7,6 +7,7 @@ .export ldeax .importzp sreg, ptr4 + .macpack generic ldeax: pla ; Low byte of return address sta ptr4 @@ -24,15 +25,13 @@ ldeax: pla ; Low byte of return address dey lda (ptr4),y tay ; Save low byte - clc - lda #4 - adc ptr4 - sta ptr4 - lda ptr4+1 - adc #$00 - pha ; High byte of new return address - lda ptr4 - pha ; Low byte of new return address - tya ; Low byte of fetched value - rts +; Calculate the return address (remember: RTS address is one low) and +; jump to it + + lda ptr4 + add #5 + sta ptr4 + bcc @L9 + inc ptr4+1 +@L9: jmp (ptr4) -- 2.39.5