Skip to content

RTS instruction cycle-count information appears to be garbled. #665

@dvdkhlng

Description

@dvdkhlng

On page L-103 in the Mega65-book.pdf it says:

Image

This looks to be the wrong way around. I.e. opcode 60, the classical RTS takes only 4 cycles, while the newer version takes 6. Also the 65CE02 manual linked on wikipedia gives 4 clocks for opcode 60 and 7 clocks for 62.

Looking through my git checkout, I tend to think that the following patch may fix the issue, but I didn't try to rebuild the documentation myself.

 diff --git a/instruction_sets/4510.cycles b/instruction_sets/4510.cycles
index ebe577f..8c6c12c 100644
--- a/instruction_sets/4510.cycles
+++ b/instruction_sets/4510.cycles
@@ -94,9 +94,9 @@
 5D 4rp
 5E 5rp
 5F 4rb
-60 6m
+60 4
 61 5r
-62 4
+62 6m
 63 3b
 64 3
 65 3r

Please double-check my findings, I'm still pretty new to 6502.

Metadata

Metadata

Assignees

No one assigned

    Labels

    newNew report, not classified yet

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions