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 .macro JsrIndirect addr,ret_addr
; -1 because rts increments it ; -1 because rts increments it
.if .blank(ret_addr) .if .blank(ret_addr)
lda #<(:+ - 1)
pha
lda #>(:+ - 1) lda #>(:+ - 1)
pha pha
.else lda #<(:+ - 1)
lda #<(ret_addr -1)
pha pha
.else
lda #>(ret_addr -1) lda #>(ret_addr -1)
pha pha
lda #<(ret_addr -1)
pha
.endif .endif
jmp addr jmp addr
.if .blank(ret_addr) .if .blank(ret_addr)