mirror of
https://github.com/cc65/cc65.git
synced 2024-12-23 19:29:37 +00:00
Optimization
git-svn-id: svn://svn.cc65.org/cc65/trunk@422 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
39478bcd8b
commit
12026ee98a
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user