diff --git a/c64/kernal/rdtim.s b/c64/kernal/rdtim.s index 41a32290..41ad0b94 100644 --- a/c64/kernal/rdtim.s +++ b/c64/kernal/rdtim.s @@ -12,7 +12,6 @@ rdtim: ;; Disable interrupts for the duration of the routine, to prevent ;; jiffy clock update while reeading it's values - php sei ;; Store the jiffy clock state @@ -20,7 +19,9 @@ rdtim: ldx TIME + 1 lda TIME + 2 - ;; Restore processor state and return - plp + ;; Enable interrupts. More elegant solution would be pha + sei + ... + pla, + ;; but (checked by running a test program) original ROM routine always + ;; leaves IRQs enabled. + cli rts diff --git a/c64/kernal/settim.s b/c64/kernal/settim.s index 2a995427..7cfb3f11 100644 --- a/c64/kernal/settim.s +++ b/c64/kernal/settim.s @@ -12,7 +12,6 @@ settim: ;; Disable interrupts for the duration of the routine, to prevent ;; jiffy clock update while changing it's values - php sei ;; Store the jiffy clock state @@ -20,7 +19,9 @@ settim: stx TIME + 1 sta TIME + 2 - ;; Restore processor state and return - plp + ;; Enable interrupts. More elegant solution would be pha + sei + ... + pla, + ;; but (checked by running a test program) original ROM routine always + ;; leaves IRQs enabled. + cli rts