Skip to content

[fix] JSL instruction#19

Merged
smokku merged 2 commits intomainfrom
fix/17-jsl
Oct 15, 2025
Merged

[fix] JSL instruction#19
smokku merged 2 commits intomainfrom
fix/17-jsl

Conversation

@smokku
Copy link
Copy Markdown
Member

@smokku smokku commented Oct 15, 2025

Fixes #17

Copilot AI review requested due to automatic review settings October 15, 2025 09:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the JSL (Jump to Subroutine Long) instruction implementation in the W65C816S CPU emulator. The changes correct the cycle timing and execution sequence to match the official W65C816S datasheet specification.

  • Adjusted JSL instruction cycle timing from 9 cycles to 8 cycles
  • Fixed the order of operations during JSL execution to properly handle address calculation and stack operations
  • Added comprehensive test coverage for the JSL instruction

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/codegen/w65c816s_gen.py Updates the JSL instruction generator to fix the cycle sequence and timing
src/chips/w65c816s.h Modifies the generated JSL instruction implementation with corrected cycle behavior
src/tests/cputest.cpp Adds new test case to verify JSL instruction works correctly

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@smokku smokku merged commit d30d0eb into main Oct 15, 2025
9 checks passed
@smokku smokku deleted the fix/17-jsl branch October 15, 2025 10:07
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

Successfully merging this pull request may close these issues.

JSL does not work correctly

2 participants