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

Generating wrong code for procedures #57

Open
Squall-FF8 opened this issue Nov 11, 2022 · 0 comments
Open

Generating wrong code for procedures #57

Squall-FF8 opened this issue Nov 11, 2022 · 0 comments

Comments

@Squall-FF8
Copy link

I have a function that is called like that:

procedure FillChar(Dest: word; Count: byte registerY; Value: byte registerA);
begin
 ... 
end;
...
FillChar($2000, 20, 10);

The code generated is:

      $08B9 A9 0A    LDA #$0A 
      $08BB A0 14    LDY #$14 
      $08BD A9 00    LDA #$00 
      $08BF 8D 0E 08 STA Src@0 
      $08C2 A9 20    LDA #$20 
      $08C4 8D 0F 08 STA Src@1 
      $08C7 20 60 08 JSR __FillChar

This code destroys Value argument, because A is overridden .

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

No branches or pull requests

1 participant