fix JsrIndirect

This commit is contained in:
matthias@arch 2024-01-02 23:36:41 +01:00
parent e1f78b2927
commit 808900602e

View File

@ -98,15 +98,15 @@ INCLUDE_UTILITY = 1
.macro JsrIndirect addr,ret_addr
; -1 because rts increments it
.if .blank(ret_addr)
lda #<(:+ - 1)
pha
lda #>(:+ - 1)
pha
.else
lda #<(ret_addr -1)
lda #<(:+ - 1)
pha
.else
lda #>(ret_addr -1)
pha
lda #<(ret_addr -1)
pha
.endif
jmp addr
.if .blank(ret_addr)