From 00854e74b9ca67c10067fdbc1d2e8e9813e1f779 Mon Sep 17 00:00:00 2001 From: Peter Evans Date: Sun, 18 Feb 2018 19:49:34 -0600 Subject: [PATCH] Explain how the JSR call is handled in some impls --- data/disk2.asm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/data/disk2.asm b/data/disk2.asm index 6dd4fd3..f4bfa3a 100644 --- a/data/disk2.asm +++ b/data/disk2.asm @@ -112,6 +112,15 @@ 46:AA TAX 47:BD 81 C0 LDA PHASEON,X 4A:A9 56 LDA #$56 + +; In at least one implementation (notably WinApple), the opcode below is +; rewritten as `A9 00 EA`, which is equivalent to: +; LDA #$00 +; NOP +; This would essentially remove the WAIT call. The WAIT subroutine will, +; in the course of its operation, leave $00 in A, which explains the LDA +; #$00 opcode sequence. The NOP is there to replace the third byte +; (which was part of the JSR address in its original form). 4C:20 A8 FC JSR WAIT ; wait for the motor 4F:88 DEY 50:10 EB BPL PHASELOOP