Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interrupt asm function and Atari cycle sensitive DLI #62

Closed
zbyti opened this issue Sep 6, 2020 · 1 comment
Closed

interrupt asm function and Atari cycle sensitive DLI #62

zbyti opened this issue Sep 6, 2020 · 1 comment

Comments

@zbyti
Copy link
Contributor

zbyti commented Sep 6, 2020

asm function with RTI at the end it's not allowed (compiler error) without interrupt modifier but this modifier forced (incorrectly) PHR into my ASM code.

then I wrote:

interrupt void dli() {
  gtia_colpf2 = $de
  antic_wsync = 1
}

everything works but DLI interrupt it's time sensitive, because of that I want to write this in ASM and push on stack only those registers what I really used.

what I want to do is:

noinline asm void dli() {
 pha
 lda #$de
 sta gtia_colpf2
 sta antic_wsync
 pla
 rti
}
@KarolS
Copy link
Owner

KarolS commented Sep 7, 2020

Using RTI without the interrupt modifier is only a warning, not an error, you can ignore it.

As for extra pushes in assembly functions with the interrupt modifier, it's a bug, I'll fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants